You need to sign in to do that
Don't have an account?
sf_dave
convertLead succeeds, upsert on resulting Account fails
All,
I can successfully call convertLead() on a lead I generate from the PHP API. Upon successful conversion to an account, opportunity, and contact I update our local copies of the Salesforce ID so I can later upsert to the same account.
The problem is when I try to upsert on the converted account passing the ID returned by convertLead I get the following result returned from the API:
So I figured I should just remove the ID returned from the Salesforce API and pass my External ID to the upsert call and it will update the existing account, but it doesn’t.
It creates a second account that I can then upsert on infinity times using the ID returned from the upsert call.
Is there something wrong with the ID’s returned for accounts made through convertLead or are there any special steps I need to take to update the resulting account / opportunity / contact?
Thanks
-Dave
I can successfully call convertLead() on a lead I generate from the PHP API. Upon successful conversion to an account, opportunity, and contact I update our local copies of the Salesforce ID so I can later upsert to the same account.
The problem is when I try to upsert on the converted account passing the ID returned by convertLead I get the following result returned from the API:
Code:
stdClass Object ( [created] => 1 [errors] => stdClass Object ( [fields] => Id [message] => cannot specify Id in an insert call [statusCode] => INVALID_FIELD_FOR_INSERT_UPDATE ) [id] => [success] => )
It creates a second account that I can then upsert on infinity times using the ID returned from the upsert call.
Is there something wrong with the ID’s returned for accounts made through convertLead or are there any special steps I need to take to update the resulting account / opportunity / contact?
Thanks
-Dave
If you still want to use the Upsert call for some reason, you need to make sure that your external Id field from the Lead is getting mapped in the conversion process to a field that is defined as an external id field in the Account.
Hope this helps,
Park
I beleive this is the doc describing how to map custom fields:
https://na5.salesforce.com/help/doc/en/customize_mapleads.htm
Thanks,
-Dave
Message Edited by sf_dave on 02-05-2008 08:29 AM