Custom Settings and Custom Metadata in Salesforce
Custom Settings Custom settings are like custom objects that allow app developers to create custom sets of data for an organization, profile, or user. This data is cached for easy access and can be used in formula fields, validation rules, flows, Apex, and SOAP API. It saves the expense of redundant database queries. Note - All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. However, querying custom settings data using Standard Object Query Language (SOQL) doesn't use the application cache and is similar to querying a custom object. To benefit from caching, use other methods for accessing custom settings data such as the Apex Custom Settings methods. Code Snippet - List< Application_Configuration__c > mcs = Application_Configuration__c.getall().values(); boolean execute = false; if (mcs[0].Type__c == 'Cloud') { execute = true; } Application_Configuration__c myCS1 = Appl...