You need to sign in to do that
Don't have an account?
Anu_g
Associating Campaign to a Lead
Hi,
I have been trying to create a Lead which includes the Campaign Name.But getting the error
INVALID_FIELD: No such column 'Campaign' on entity 'lead'.
How can i take the campaign name to get it inserted into the Lead Table using the API
Any sample code is appreciated
I have been trying to create a Lead which includes the Campaign Name.But getting the error
INVALID_FIELD: No such column 'Campaign' on entity 'lead'.
How can i take the campaign name to get it inserted into the Lead Table using the API
Any sample code is appreciated
Park
$campaign_id = '2r2323r23'
$lead_id = 'asdf123123';
$sObject = new SObject();
$sObject->type = 'CampaignMember';
$fieldsToUpdate=array(
'CampaignId'=>$campaign_id,
'Status'=>'Responded',
'LeadId'=>$lead_id,
);
$sObject->fields = $fieldsToUpdate;
$newrec=0;
$newrec = $sfcon->create(array($sObject));