Sunday 5 May 2013


Record Types

Record types overload the native user interface behavior of a single object.This allows
you to get more mileage out of your existing objects or limit the complexity of a new
data model.

For example, Salesforce uses this feature in its CRM product. Person Accounts are a
record type of the Account object.Accounts ordinarily store information about businesses,
but the Person Account record type adapts Account to store information about
individuals. Salesforce opted to overload Account with a record type rather than creating
an entirely new object.
Before creating a separate object to represent every business entity, ask yourself
whether the entity is truly new or merely a slight variation of another entity.Where you
find slight variations, consider using a single object to do the work of many.The single
object contains a superset of the objects’ fields.The record type of each record determines
which variation of the business entity is stored. Force.com consults the record type and
the user’s profile to display the correct native user interface.
Even if you don’t plan to use the native user interface, record types can expand the
flexibility of your data model. By using record types, you gain an additional standard field
called RecordTypeId. In custom user interfaces, you can use this to drive different functionality.
Of course, you can always add your own custom field to accomplish the same
thing, but record types force you to make your design explicit at the native Force.com
level and provide tight integration with native Force.com security.
Record types can be tricky to configure because they interact with many other features
of Force.com.This section examines record types across three areas:
1. Defining Record Types: Record types enable picklist fields to be customized to
show different values for different record types of an object.They also add another
dimension of flexibility when designing page layouts.
2. Securing Record Types: Users gain access to record types through their profiles.
3. Using Record Types: The native user interface changes in some significant ways
when a user has rights to multiple record types.

No comments:

Post a Comment