Help get this topic noticed by sharing it on Twitter, Facebook, or email.

custom setting read / update

Hi
How is it possible to read/update a custom setting?
Thanks
1 person has
this question
+1
Reply
  • You can query, replicate, insert, and update a custom setting. For example, follow below:

    Lets say you have a custom setting object called CSTEST__c

    To Replicate:
    exec SF_Replicate 'SALESFORCE', 'CSTEST__c'

    To Query:
    select * from SALESFORCE...CSTEST__c

    To Insert or Update:
    Create a load table with the records and fields you want to insert or update. To insert, do not supply any record Ids. To update, you must supply the record Ids you want to update. The below example is an update:

    1. Create load table:
    create table CSTEST__c_load
    (Id nchar(18),
    error nvarchar(255),
    Name nvarchar(80))

    2. Insert record Id you want to update and field(s) you want to update:
    insert into CSTEST__c_load (Id, Name)
    values ('a0Z6000000BGoxxEAD', 'Test100')

    3. Use SF_BulkOps to update the custom setting object:
    exec SF_BulkOps 'Update', 'SALESFORCE', 'CSTEST__c_load'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Perfect, thanks!
    Looks like custom setting behaves like any other custom object.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated