function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

What is the best way to have global settings in SF?

I'm working on a number of customizations to SFDC and there is at least one value that I will need virtually everywhere in my code. But I don't want to hardcode this everywhere. I would like to have a single place where this value can be updated and hopefully it will be possible to distribute it in a package when I am done.


What is the best way to have such a "global" setting? I was thinking about a custom object with a single record, but then I am not sure how to refer to it from everywhere since it's not related to anything per se...


Any suggestions will be greatly appreciated.


Thank you in advance.


Here's a thread asking for something similar. I think custom object is your best approach. Think of this object as the app preferences. You can query the content using Apex Code for your app to function.


Hope that helps,


Message Edited by shillyer on 03-19-2009 09:48 AM
Thank you.
Anant KamatAnant Kamat
Just came across your question while searching for Global Settings. I hope you would have figured out that either custom settings or custom labels can be used to do the trick and achieve the desired result.