Tuesday, June 27, 2017

Salesforce Basics - Custom Settings

Custom Settings are similar to Custom Objects and enable application developers to create custom sets of data, as well as enable and associate custom data for an organization, profile or specific user.

All custom setting data is exposed in the Application Cache.

This enables efficient access to data without the cost of repeated queries to database.

Custom settings data can be used by Formula fields, Validation Rules, Apex and SOAP API.

There are two types of Custom Settings:

1) List Custom Setting:
Provide a reusable set of data that can be accessed across the organization. If we use particular set of data frequently within our application, putting that data in List Custom Settings streamlines access to it.

Data in List Custom Settings does not vary with profile or user. It is available organization-wide.

Examples: Two-letter state abbreviations, International dialing prefixes, and Catalog number for products.

As the data is cached, access its low cost and efficient: we don't have to use SOQL queries that count against governor limits.

2) Hierarchy Custom Setting:
It uses built-in hierarchical logic that lets us "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.

Examples: An application calculates and tracks compensation for its sales reps. But commission is based on seniority. By creating a Hierarchy Setting, administrator can associate different commission percentages to each profile in the Sales Organization. Then using a formula field, right compensation can be calculated for all users with the help of hierarchical settings commission percentages for respective profiles.

No comments:

Post a Comment

Lightning Inter-Component Communication Patterns

Lightning Inter-Component Communication Patterns If you’re comfortable with how a Lightning Component works and want to build producti...