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
anan 

Custom settings to cache records

I have a need to implement countries as an object in salesforce to be able to link the countries to regions and other data easily. This will be needed especially in reporting.

We don't want to implement visualforce page for all the objects that have association to country and that is a another reason not to use custom settings for this one.

Custom settings would however make it much easier to handle the the country data in triggers (we have several integrations where we are sending country code instead of name or sf id).

What I was planning is that I would have a custom country object and a custom settings for countries. Additionally I would implement a simple trigger on country custom object that copies necessary values to country custom settings. That way I would have cached country data that could be used in triggers easily without consuming soql limits.

Has anyone used this kind of approach? Do you see any issues related to this?
Ashish_SFDCAshish_SFDC
Hi , 


Read through the blogs for more information and direction on Custom Settings, 


Using List Custom Settings in Salesforce.com

http://blog.jeffdouglas.com/2010/01/07/using-list-custom-settings-in-salesforce-com/


Using Hierarchy Custom Settings in Salesforce.com

http://blog.jeffdouglas.com/2010/02/08/using-hierarchy-custom-settings-in-salesforce-com/


Custom Settings vs. Custom Objects in Salesforce.com

http://www.opfocus.com/blog/custom-settings-vs-custom-objects-in-salesforce-com/


O Custom Settings, Custom Settings…wherethou art thou Custom Settings?

http://techman97.wordpress.com/tag/custom-settings/


Regards,
Ashish