function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AbAb 

Implement validation rule - modify field on contact if opportunity stage is won

Hello,

I have lookup "contact" on my "opportunity", 
"Contact" has a field called "XYZ (checkbox)".
I want to implement a validation rule which says that, if the Opportunity Stage is Won, then only allow the users to mody the checkbox on Contact.

How can i implement this validation rule ?
thank you for sugestions
Best Answer chosen by Ab
Adilson Arcoverde JrAdilson Arcoverde Jr
Hi Sandrine,

I think this is not possible to archives using validation rules, since contact is opportunity parent.

The solution is to create a trigger on Contact and check if all opportunities related to it is won. If not, you could use addError to avoid saving the contact record.

Hope you find this solution useful. If it does, please mark as Best Answer to help others too.

Regards.