I created a custom setting with two fields Active__c and Age__c. In my apex code, I want to retrieve one record from this custom setting where Name='Days'. This will return only one record. Would I need to use List to get this result or can I simply get this into a variable?
1 Answer
here you go :
MyCustomSetting__c cs = MyCustomSetting__c.getInstance('Days');
// you then have access to cs.active__c and cs.age__c