I have a trigger on Contract Object, whenever the Contract record is updated the contract section in the associated opportunities will also get updated with the latest Contract data but while updating Contract record, Contract section in associated Opportunities is not updating instead I am getting validation errors which is created on Opportunity object.

Now I want to stop Opportunity validation rules when I update the contract section of Opportunity object from Contract trigger. Is there anything that we can pass from trigger to validation rules to stop validation rules errors?


1 Answer 1


See e.g. Disable Validation Rule with Apex Code.

Add a custom field to the object that your trigger sets and unsets, and then incorporate a check of that custom field in the validation rules.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .