You need to sign in to do that
Don't have an account?
Sonali_takke
Bypass Validation Rule Issue
Hi Developers,
- I have created Bypass_Validation checkbox with default value as FALSE.
- I updated Validation Rule Formula to include the line Bypass_Validation = FALSE
- I am setting it to TRUE to bypass validation rule through apex\
- Now I need to Set Bypass_Validation back to False so that Validation rule will fire when user creates records through UI.
- I have created new process builder on that object to set it FALSE but when process builder sets it to FALSE it again trigges validation rules.
Greetings!
Can you please check this blog where we have the steps to make bypass the validation by creating the checkbox and with the Workflow.
https://www.mandsconsulting.com/how-to-bypass-validation-from-apex-across-objects-salesforce/#:~:text=Be%20sure%20to%20update%20your,updating%20the%20Last%20Interview%20Date.https://www.mandsconsulting.com/how-to-bypass-validation-from-apex-across-objects-salesforce/#:~:text=Be%20sure%20to%20update%20your,updating%20the%20Last%20Interview%20Date.
Also,please check the sample code for bypassing the validation rule using Apex:
https://salesforce.stackexchange.com/questions/191192/how-to-bypass-validation-rules-when-running-apex-class
Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.
Warm Regards,
Shirisha Pathuri