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
hawkmoon82hawkmoon82 

Associate Lead to Campaign with external ID

Hi Guys,

'm trying to associate leads coming from my site form to existing campaign.
If I use the parameter Campaign_ID with the value hardcoded it works well.
What I need is to associate lead to campaign reading an external ID passed by the form submission ('cause my company is recording the contact in another system too).
I created a field into the campaign panel named "activityid" (value 00N20000002vc0v) as an external id but if i set in the form the code: $form_vars['00N20000002vc0v'] = 'EXTERNAL ID'
it fails and do not associate.


maybe something like that should be useful?

on lead creation
if (Lead.activityid = Campaign.activityid)
{
associate lead2campaign Lead.Campaign = Campaign.activityid.name
}

 

thx