+ Start a Discussion
sundar s 24sundar s 24 

how to bypass validation

any simple setting to bypass validation rule?
ShivankurShivankur (Salesforce Developers) 
Hi Sundar,

Please check out a way implemented and demonstrated for bypassing the validation rule in Salesforce:
https://www.j2interactive.com/blog/bypassing-salesforce-validation-rule/

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.
Ashish Singh SFDCAshish Singh SFDC
Hi Sundar,

It depends on your use case when and how you want to bypass.

For example, if you want to bypass the validation rule for specific profile then you can simply user $Profile but then you would do some hard coding and hence its best to use Custom Permission.

By Pass Validation using Custom Permission (https://www.salesforcechris.com/custom-permissions-in-validation-rules/#:~:text=Custom%20permissions%20can%20be%20referenced,without%20touching%20the%20rule%20again.)

If you want to bypass by record type then you can again make validation rule in such a way that it should not fire if specific record type exists. You can leverage custom setting to avoid hardcode.

Thanks,
Ashish Singh.