In Operating Systems, you're provided with Registry/KeyChain, or just a local .ini file, in Webservers / own webserver, you can have a "config" table in database... is there anything close to what I'm looking for in salesforce?

I did think of creating a Custom Object with Fields of Name(Text) and Value(Text) which could contain a long json string. But it sounds sort of costy - in short, that's my last plan of tackle...

A perfect example would be, iPhone apps (can) have their own config page in settings app!

Main reason I'm asking this is no matter what I search in google I get irrelevant results.

1 Answer 1


In Salesforce, we have Custom Settings and Custom Metadata. While there's some differences between them, the main takeaway is that both can be used to provide custom configuration that can be used by Lightning components and Apex code. With both, you can modify the values in Setup using the appropriate interface, and there are API calls that support retrieving, updating, and deleting these settings. Without knowing your specific use case, it's hard to tell which one you'll want to use, but I think just reading the documentation should help you make a decision on the best choice.

  • An actual use case for me would be, being able to show/hide a section of a visualforce page like <apex:outputPanel rendered="{!CONFIG.showSectionA}"></apex:outputPanel>
    – Mac A.
    Sep 19, 2018 at 22:46
  • @MacA. Yes, you can do that via custom settings, for example: rendered="{!$Setup.MyAppPref__c.ShowSectionA__c}" You can do this per user, per profile, or a default for the whole org.
    – sfdcfox
    Sep 19, 2018 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.