Update field on opportuntiy depending on Opportunity Contact Role

There is a field on Opportunity called Opportunity Contact. It is a look up to Contact.

My approach was to create a trigger on Opportunity Contact Role. After Update of Opportunity Contact Role, the trigger needs to update Opportunity Contact field with the value of Contact ID of the Contact for which the Opportunity Contact Role is Primary.

But Trigger on Opportunity contact role is not possible.

Can any body suggest me solution to update above field?


You can try using batch class for this. Get all the records of Opportunity Contact Role with your specified criteria and update the field. You can schedule the class to run at a specified time each day.


Source : Link , Question Author : Swapnil Kale , Answer Author : Ruchi

Leave a Comment