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

  • can trigger override validation rules in Salesforce?

    Posted by Anuj on May 27, 2020 at 2:08 PM

    can trigger override validation rules in Salesforce?

    Shweta replied 6 years ago 2 Members · 1 Reply
  • 1 Reply
  • 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.