I have created a custom object called Campaign_c and then created a M:M relationship with Contact object.
The intersection object I called it CampIntCont
- ObjectA is the Source Object: Campaign
- ObjectB is the Intersection Object : CampIntCont
- ObjectC is the Target Object: Person
-Field name for the foreign key to the Source Object: ObjectA_Id_Src_ObjectAToObjectB_c
-Field name for the foreign key to the Target Object: ObjectC_Id_Tgt_ObjectCToObjectB_c
You have I also created a DCL as a picker for contacts to be added in the custom Object Campaign
I called it: ContactPicker_c
Now Create a Trigger Before Update (to add on update record the contact) or Create a Action Link in Custom object Campaign
Same script works in both situations.
Script looks like this: