Overview of Objects


The Force.com platform provides a powerful database, with many features that make it faster and easier to create applications. In a relational database, data is stored in tables. Each table comprises a number of columns of a particular data type, such as text, number, or date. Information is stored in rows of the table. Tables can be related to other tables, using primary and foreign keys. Apps manage information by creating, reading, updating, and deleting rows in a table.

The database in Force.com, on the other hand, uses objects to store data. Objects contain all the functionality you expect in a table, with additional enhancements that make them more powerful and versatile. Each object comprises a number of fields, which correspond to columns in a database. Data is stored in records of the object, which correspond to rows in a database.

There are two types of objects.

  • Standard Objects: These are objects included with Salesforce, by default, for example the objects used to store data in standard tabs such as accounts, contacts, or opportunities.
  • Custom Objects: These are new objects you create to store information unique to your organization. Custom objects extend the functionality that standard objects provide. For eg: if you’re building an app to track product inventory, you can create custom objects called Merchandise and Invoices, as shown in the figure below.

Each standard or custom object consists of a set of fields. There are several different types of fields, as described below.


Other Features of Objects
  • Formulas: Formulas can be used in many places, such as setting up validation rules, creating workflow rule criteria, and even to define a field. A formula field type behaves much like a spreadsheet formula. It reflects some calculation based on other fields and operations on those fields. The formula language is a rich expression language that lets you perform calculations and manipulate strings, dates, numbers and regular expressions.
  • Validation: Validation rules help improve data quality by preventing users from saving incorrect data. These rules use the same formula syntax as found in formula field types to define a formula which is evaluated each time a record is saved. If the formula for a validation rule evaluates as “True”, the save is aborted and an error message displayed. You can define one or more validation rules that consist of an error condition and corresponding error message. For example, you can create a validation rule to ensure that a number falls within a particular range.
  • Triggers: Triggers, written in the Apex language, are pieces of code that can fire before or after a record is saved, updated or deleted.
  • Labels: Every object and record has a label and can include a description, for help, which is automatically included in the user interface.
  • Notes and Attachments: You can create, view, and edit notes and add attachments for any record in an object that has this functionality enabled. This provides users of the object the ability to easily add arbitrary text notes, and upload associated documents, for each record.
  • Track Field History: Certain fields on your objects can be configured to track their history. Any time a user modifies any of the field data whose history is set to be tracked, a new entry is added to an automatically created History related list. This History list tracks the date, time, nature of the change, and who made the change.
  • Security: Database services provide a flexible security model that you can use to control who has access to objects, records and/or fields.

Comments

Popular posts from this blog

Types of Record Sharing

Salesforce Admin 201

Account Territories