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

Trying to update campaign member if he/she buys something?

Hi i have setup an opportunity trigger that automatically adds a opportunity to a campaign only if there is is an active campaign and is determined from the opp lead source. Now what i want to do is to update the campaign member which i can only see a contact relationship any pointers?

You'll need to use contact roles on teh opportunity as that will close the loop.  You'll then need some logic to figure out which campaign's members to update (primary campaign source members?).


The oppty trigger can then find the contact roles, and query for the campaign members for those contacts where campaign = desiredCampaign.