Wednesday 8 May 2013


Custom Settings

Custom settings are a special data storage feature designed for relatively simple, frequently
accessed data.The type of data stored in custom settings is ancillary, used to configure or
control your application rather than the operational data itself, which belongs in standard
and custom objects. For example, user preferences in a Java application might be stored in

an XML or properties file. In Force.com, they are stored in custom settings. Data in custom
settings is readily accessible throughout the Force.com platform in Apex,Visualforce,
formula fields, validation rules, and Web Services API.As an example, a custom setting
named Expert might indicate whether a given user receives the default or advanced version
of a user interface.
A custom setting is an object definition,much like a standard or custom database object. It consists of a name, a type, and one or more fields.The two types of custom settings are List and Hierarchy:
 List: The List is the simpler form, behaving like a database object except for the fact that records are accessed one at a time, by unique name. For example, you might define a custom setting with fields representing configurable options in your application, and each named record representing a collection of those options, such as Test and Production.
Hierarchy: The Hierarchy type expands upon the List type, adding the ability to relate data to organization, profile, and user. If a value is not provided for a given level, it defaults to the levels above it.With Hierarchy types, you can create applications that manage settings for individual users, but defer to a profile or organizationwide default when necessary without storing and maintaining redundant,overlapping information.

No comments:

Post a Comment