Hierarchy custom settings can be configured at varying user specificity levels under a single name; the platform will look for the most specific configuration first, then fall back / inherit to the least specific:
- setting per user,
- setting per profile,
- setting for whole org,
Hierarchy custom settings are easily retrieved in Visualforce:
{!$Setup.Setting__c.Field__c}
and will be resolved according to the current user context.
List custom settings have user-independent values, retrieved under multiple names. For example, you could use several configs to hold the credentials for a web service callout so that you can swap the endpoints:
- setting for development environment,
- setting for volume testing environment,
- setting for production environment,
List custom settings need to be accessed using a controller if you want to avail them on a page, for example
return ListSetting__c.getInstance('dev').Field__c;
No comments:
Post a Comment