I can create lead via salesforce php api toolkit , by my client said every lead should be associated with a campaign , and he gave me a campaign id . The campaign id is similar to something like this "701g0000000Irtl" . I tried something like this
$records = array(); $records = new stdclass(); $records->FirstName= $user_first_name; $records->LastName= $user_last_name; $records->Email= $user_email; $records->Company= 'MYCompany'; $records->PostalCode= $current_user_zip; $records->Newsletter_Signup__c= $news_letter_sign_up; $records->Campaign= "701g0000000Irtl"; $response = $mySforceConnection_enterprise->create($records, 'Lead');
But it doesn't a crate a lead with a campign id . But If I remove the line $records->Campaign= "701g0000000Irtl"; It works fine , it create a lead in salesforce without any campaign associated with it .