You need to sign in to do that
Don't have an account?
Kemp100
New to Salesforce, Please advice on Creating a Lead
I am trying to create a lead and i am using using the WSDL file that came with the package. Do i need to get my own Customized one? If so, where can i get this.
After that, I have this code to LOGIN and Create a lead, but its not working...Can someone help. I am using PHP
//Login
$mySforceConnection = new SforcePartnerClient();
$mySforceConnection->createConnection($wsdl);
$loginResult = $mySforceConnection->login($username, $password);
$fieldsToAdd = array( 'Name' => $name, 'BillingCity' => $ct, 'BillingState' => $st, 'Phone' => $phone, 'Fax' => $fax );
$sObject = new SObject();
$sObject->fields = $fieldsToAdd;
$sObject->type = 'Lead';
$add = $mySforceConnection->create( array( $sObject ) );
for some reason i get a INVALID_TYPE: sObject error on that.
Can someone tell me why that is not working..and also, once i add it..how can i check to see if it actually ADDED..
--thanks
After that, I have this code to LOGIN and Create a lead, but its not working...Can someone help. I am using PHP
//Login
$mySforceConnection = new SforcePartnerClient();
$mySforceConnection->createConnection($wsdl);
$loginResult = $mySforceConnection->login($username, $password);
$fieldsToAdd = array( 'Name' => $name, 'BillingCity' => $ct, 'BillingState' => $st, 'Phone' => $phone, 'Fax' => $fax );
$sObject = new SObject();
$sObject->fields = $fieldsToAdd;
$sObject->type = 'Lead';
$add = $mySforceConnection->create( array( $sObject ) );
for some reason i get a INVALID_TYPE: sObject error on that.
Can someone tell me why that is not working..and also, once i add it..how can i check to see if it actually ADDED..
--thanks
You may want to use the Enterprise WSDL as a reference document for object and field names. If you check the Lead object you will see that the field names that you are using are incorrect. The Billing* fields do not exist in the Lead object. Uisng just 'City' and 'State' should provide better results.