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
AashikaAashika 

Update field on Contact records based on the Primary record from the Oppurtunity Contact Roles?

Hi there,

 

I am trying to update the field on the Contacts called - IsHasOpty to be TRUE or FALSE, based on the following conditions:-

 

a> If the related Oppurtunity has a stage = Closed Won.

b> If the same Oppurtunutiy  has a type = New Account.

c> If the Contact Role of that same Oppurtunity displays the Contact as a PRIMARY.

 

If all the above conditions are satisfied then it should update the field on the Contact record.

 

My question is:-

 

1> Can we create a Trigger on Oppurtutnity Contact Role to do the same or on Contacts or Oppurtunity.

 

 

Which would be my best option.

 

 

Thanks