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
U ChauhanU Chauhan 

Trigger to update campaignmember fields

Whenever a Campaign member of type lead is inserted, check the RSVP field on campaign member, if it is blank and if the Lead RSVP field has value we would need to update that value on the Campaign member RSVP field.
Deepak GerianiDeepak Geriani


I will be writing the logic to implement not the complete code for your requirement.

if(Campaign member.type == lead){
Campaign member.RSVP = Campaign member.RSVP=='' ? Campaign member.lead.RSVP : Campaign member.RSVP;
update Campaign member

This is just sample logic you can try and implement it using your field name.

If my answer has helped you to resolve your issue please mark this answer as resolved.