You need to sign in to do that
Don't have an account?

How to query on Hierarchical custom setting records in apex
I have a hierarchical custom setting called Audience__C and i have a checkbox field 'Booking__c'. now i have a requirement if booking__c is checked then update a field. So, how to query and put if condition on custom setting.We are using "Default Organization Level Value".
Please help on this.
Please help on this.
don't query the custom setting. Use
audience__c a Audience__c.getInstance() ;
System.debug(a.booking__c);
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_custom_settings.htm
If this helps, please mark as Best Answer to help others too.
thank you for your reply but how to put if condition ?
Audience__C highVol = Audience__C.getOrgDefaults();
sorry, I don't understand your remark.