I have a question regarding Custom Settings. I'm implementing a bypass strategy for triggers. I created a Custom setting with one checkbox called Bypass_Processes__c for System Admin. Then in the code, I'm looking for the value in the field.

public Boolean isDisabled() { Process_Automation_Settings__c bpSetting = Process_Automation_Settings__c.getInstance(UserInfo.getProfileId()); return bpSetting.Bypass_Processes__c ? true : triggerDisabled; }

My question is what value will have the field if there is no setting set for the Profile, for example, Standard user. I have tested and I think it's going to be false, but want to be sure.

Thank you

1 Answer 1


Assuming Process_Automation_Settings__c is a Hierarchy type custom setting, the value of Bypass_Processes__c will be the default value defined at the Organization-level if no Profile-level or User-level setting is defined for the current user.

Read the section on "Hierarchy Custom Settings" on the official docs here: Custom Settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .