Understand Custom & Standard Objects

-Based on Salesforce Trailheads-

The Force.com platform provides an enhanced database. It is comparable to a traditional relational database, in which:

  • Data is stored in tables
  • Each table has columns with particular types of data
  • Information is stored in rows of the table
  • Tables are related with one another using primary and foreign keys
  • Apps manage information by creating, reading, updating and deleting rows in table

The database in Force.com uses objects (which are analogous to tables) to store data. They do much the same things but contain enhancements which make them more powerful and versatile. There are two types of objects:

  • Standard objects. Included in Salesforce by default.
  • Custom objects. New objects that you create to store information unique to your organisation.

Relationship fields are how relationships are defined between objects. They play the same role as primary and foreign keys in a database.

In addition to storing data, Force.com objects also form the basis for interacting with data. Interface elements such as tabs, layout, and related lists hinge upon objects. There are other features too; such as validation rules, record types etc. All attributes about an object are described with metadata.

Every object consists of a set of fields. There are various types of fields:

  • Identity field. Each record has a unique, automatically assigned ID. 15 digits case sensitive or 18 digits case insensitive. Found in URL or in reports. This allows each record to be identified, searched for etc.
  • System fields. The identity field above is an example of a system field: something which is read-only and automatically generated. Others include CreatedDate, CreatedById, LastModifiedById, LastModifiedDate and SystemModStamp. These fields are automatically updated when an object is created or modified.
  • Name field. Human-readable identifier for each record. Can be either a text string or an “auto-number”. Required.
  • Custom field. Add custom fields to new objects or use them to extend the functionality of standard objects. When creating a custom field you must select a field data type. Examples of available types include: Checkbox, Date, Number, Email, Phone, URL, Picklist, Text, Text Area, Currency and Formula.
  • Relationship field. Defines relationships between objects. Comes in two types: Lookup and Master-Detail.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s