You need to sign in to do that
Don't have an account?
Kevin Charette 8
update lead when it is added as a campaign member
Hi there. I would like to get a lead to update with the most recent campaign they are a part of. I believe this requires an Apex trigger off the campaign member. My guess something like when campaign member is created > look for lead or contact id> update lead/contact "Most recent Campaign" lookup field witht the campaign ID of the campaign member. While I think that logic seems correct, I do not know apex. Any help would be greatly appreciated!
All Answers
I wonder if there is a way to do this for the opportunity too?
Kind of last minute I know. But if you have the time to advise on one around an opportunity field, that would be awesome!
Just commented the opportunity test method
Can you please bulkify this trigger?
What do you mean bulkify the trigger? Where you feel it is not bulkify?
Incase if we need to process multiple leads and campaigns means. That case
multiple campaigns on single leads means that instance am saying.
Do you have a design (schema)? I mean how are you planning to process the lead with the campaigns so that I can build something for you? I am asking this because your process start from the lead so the trigger flow will change in this case and above will not work as that start from the campaignmember?