Thursday 9 May 2013


Using Hierarchy Custom Settings

Hierarchy type custom settings provide additional options when storing values.To see
them in action, create a new custom setting object called Hierarchy Setting with an
object name of HierarchySetting.Again, add a checkbox field named Debug.The default
value of Debug selected here is the organization-level setting, which applies if no values
are defined for a user or profile.

When you’ve finished creating the custom setting, add a new value to it.You are
prompted to set the value of the Debug field as with the List custom setting example. But
there is an additional system field called Location. Location determines at which level in
the hierarchy the setting applies.The two options are Profile and User.Try to create two
custom setting records, one with Debug selected for the System Administrator profile, and
the other a user in that profile with Debug deselected. Figure 4-15 shows the result of
this, with a custom view (named Custom View) that pulls in the value of the Debug field
to show it varying across the two custom settings records.

Caution
Storage limits exist on custom settings data. For example, in a Developer Edition organization,
you cannot store more than 2MB total in all of your custom setting objects. Current
usage and the limit for your organization is shown on the Custom Settings main page. To
view it, go to the App Setup area and select Develop -->Custom Settings.

No comments:

Post a Comment