Activity Forums Salesforce® Discussions can trigger override validation rules in Salesforce?

  • Shweta

    Member
    May 27, 2020 at 2:29 pm

    It is not possible for triggers to ignore validation rules without adding custom logic. If the request to save a record originates outside of a Standard UI edit page, any before triggers you've defined will run prior to the execution of validation rules.
    Here is strategy to bypass this behavior:
    1. Add a "Skip Validation" Checkbox field to the object
    2. Set the "Skip Validation" field to TRUE in a before trigger.
    3. Add logic to your validation rules so that they do not execute if "Skip Validation" is set to TRUE.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos