salesforce question

    List Custom Settings Vs Hierarchy Custom Settings In Salesforce

    List Custom Settings:
    A type of custom setting that provides a reusable set of static data that can be accessed across your organization. If you use a particular set of data frequently within your application, putting that data in a list custom setting streamlines access to it. Data in list settings does not vary with profile or user, but is available organization-wide.

    How to use:
    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;

    Usage of List Custom Settings:
    If we want to display a picklist in VF page for user to choose the country, we can use the List Custom Settings to add values to Picklist. The advantage is, if we want to change or add picklist value, we do not need to change it in a VF page. In Custom Settings, we can add or change the value.

    Hierarchy Custom Settings:
    A type of custom setting that uses a built-in hierarchical logic that lets you “personalize” settings for specific profiles or users. The hierarchy logic checks the organization, profile, and user settings for the current user and returns the most specific, or “lowest,” value. In the hierarchy, settings for an organization are overridden by profile settings, which, in turn, are overridden by user settings.

    How to use:
    Hierarchy custom settings are easily retrieved in Visualforce: {!$Setup.Setting__c.Field__c} and will be resolved according to the current user context.

    Usage of Hierarchy Custom Settings:
    If we want to create custom configuration settings based on Profile or User, we can use Hierarchical custom settings.

    November 15, 2018 1 comment
    1 Facebook Twitter Google + Pinterest