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
Douglas TrasterDouglas Traster 

Opportunity Contact Role pass to Contact

I have been able to get a trigger to work that either updates a checkbox on the Contact Object based on whether an Opportunity is Open or not (based on the Stage Name).

This checkbox updates Pardot.  What the Marketing dept would like to know is there a way that I can pass the Opportunity Contact Role (any of them, not just primary) over to the Contact Object?  

I could create a custom object, and then create a lookup value link to Opportunity to use a cross-object formula, but I don't see it there.  Plus, since Contact is a child in the relationship, I can't get a value to show due to the 1:M relationship.  

Can anyone think of another way to do this?
SonamSonam (Salesforce Developers) 
You cannot really create a trigger on Oportunity Contact role when it changes/added, however, there is a possibility of using scheduled apex such that you can have code scheduled to run every day to check change in opp contact role and then process steps related to it - explained on the thread:
http://salesforce.stackexchange.com/questions/47190/trigger-to-find-change-in-contact-role-for-an-opportunity