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
peter.olivier1.3897275862899202E12peter.olivier1.3897275862899202E12 

Trouble with a lead conversion - Error: "ConvertLead failed. First exception on row...

I'm having trouble with a custom lead conversion, and I keep getting this error: "ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, accountId must be specified if contactId is not null:"

Would love some help!
Norm Sherman SFNorm Sherman SF
If you are supplying the ContactId, then you must also supply the AccountId.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_convertlead.htm
peter.olivier1.3897275862899202E12peter.olivier1.3897275862899202E12
Thanks Norm! The way we're doing the lead process it should create a Contact and an Account upon conversion. In the lead I'm trying to convert, I have both the Contact and the Account fields complete. Any idea where I'm going wrong?

Norm Sherman SFNorm Sherman SF
Well the error message says you don't have an AccountId specified. Have you verified through a system.debug() statement?