You need to sign in to do that
Don't have an account?
work on campaignmember with trigger
I'm writing a trigger that runs when a campaign member is added and gets a list of all lead ids if the campaign includes a boolean value. I don't know how to get the boolean value from the Campaign - all I know is I can say "cm.Campaign.Requires_Immediate_Response__c". Can anyone let me know how I should write the RIM = line (and maybe how I can use it in the IF statement rather than assigning the value to a boolean and then checking if it's true?
Thanks in advance for any assistance!
Gail
for (CampaignMember cm : Trigger.new) { RIM = Select [select Requires_Immediate_Response__c from Campaign] from cm; if (RIM == true && cm.LeadId != null) { ids.add(cm.LeadId); } }
Try this