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
bristolbluebearbristolbluebear 

custom add to campaign button

Hello

Can someone help with a custom add to campaign button. I have created the button on the campaign object so it appears on leads and contacts screens. Its pointing at a specific campaign so it does away with the find campaign feature.  

This is what I have:

/00v/e?c_id=701D0000000hrS6
&RecordType=012D0000000BeKT
&parent_id={!Contact.Id}
&{!CampaignMember.Status}="Invited"

Works fine adding a contact to the campaign, but I'd also like the same button to add a lead from that object.

Can you add parent id to look at contact.id or lead.id or do I have to have java script instead? I'd also like for it to save and return to the parent.id if possible. 

Thanks in advance. 

Marc