You need to sign in to do that
Don't have an account?
Trigger on CampaignMember can't update Contact
Hey all,
Apex newbie here. Tried researching this here and through google, can't seem to find an answer.
I have a trigger on CampaignMember, after insert. I'm trying to do a basic lead scoring implementation by counting the number of campaigns that Contacts enter. I'm writing out values with debug statements and it would seem to me that everything hooks together as it should, but after the event, the Contacts don't retain the values set by the trigger. Is it that you cannot modify a Contact from a CampaignMember trigger? If so, is there a place where you can see these types of rules laid out? I read through all the Trigger documentation in the Apex Developers Guide and can't see any such restrictions.
Here's the jist of the code:
Appears to be some sort of Heisenbug Uncertainty stuff going on with this one. As soon as I posted this I went back and did more tests without changing a thing and it works as expected now.