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
mikeegarmikeegar 

Custom Settings For APEX?

Hi,
    I thought I saw a post recently that it would be possible to store custom settings in Salesforce and access them through APEX. I don't see anything in Summer '08. Is this on the way?
 
Thanks,
Mike
BoxBox

How do you mean 'store custom settings'?

There are currently two options at your disposal:

1) Custom objects to hold your configuration settings
     - Pro - Automatic creation of the UI for configuration
     - Con - Uses SOQL call to get at configuration

2) XML file to hold your configuration settings
     - Pro - Don't need SOQL call to get at configuration files
     - Con - I haven't written a GUI XML editor on salesforce.com........ yet =O)

Both work very well and i choose between them depending on the requirement at hand


mikeegarmikeegar
Interesting. How do you get the contents of a document without using up a SOQL query?  Is the HTTP Request object able to do inbound calls?
BoxBox
One of my favorite pieces of code and it is all done through a Document handle and an XmlStreamReader

BoxBox

Ah sorry, there is one SOQL for the document (forgot about that one) but the document can have many objects in it so you only have one call for many config objects.

My bad!