+ Start a Discussion
Mars Rover 570Mars Rover 570 

how to add custom data sets in apex code and update custom settings

Raj VakatiRaj Vakati
Please refer this link 
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_custom_settings.htm

and Sample code to update 
CustomeSetting__c cust = [Select Id, Value__c From CustomeSetting__c Where Name = 'Values'];
cust.Value__c = 'Data';
update cust;