Tutorial by Examples

Creation To create a Custom Setting, go to: Classic Setup > Develop > Custom Settings > New Lightning Setup > Custom Code > Custom Settings > New Create your setting (see the Remarks later in this document for the differences between Hierarchy & List custom settings). You...
Custom Setting Custom Setting Field Custom Setting Field Value When the field is checked the validation rule will be disabled, for the running user or in this example, their profile - The rule can also be disabled for a whole Salesforce org - Validation Rule AND( /* the below is the...
Explanation In this example a simple Trigger has been created to change the Close Date of an Opportunity, that's about to be inserted or updated, to a date 10 days in the future. The Apex Controller custom setting's checkbox field enables the code to be disabled at the user / profile / org level. ...
You may wish to update your custom setting's during the execution of your code, to switch off validation or workflow rules. In the below code, I have created a Schedulable Apex Class which will update the Close Date of any Opportunities whose Close Date is less than or equal to 6 days from the curr...

Page 1 of 1