Hi,
When the lead is auto converted, logic is implemented to identify whether any duplciate account or contact exists. If so, then the accountid/ContactId is passed to the lead convert class.
A scernario where the duplciate rule identifies a existing contact. Now , I need to convert the lead by creating new account and merge to existing contact. I have set the contactId using setContactId() method and the null for setAccountId(), as there is no duplicates for account.
This is throwing an error : System.DmlException: ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, accountId must be specified if contactId is not null: [Id].
Please let me know if there is a way to override this error.
PS;
Allow users to relate a contact to multiple accounts is enabled.
Thanks
Jeya
#Salesforce Developer #Automation #Lead Conversion