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

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.
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?