I get an error when I try to run a user object into an existing master object.
List<Lead> leads =[select Id from Lead where Email =:lead.Email ];
if(leads.size()>0)
{
Lead existing_lead = new Lead(Id = leads[0].id);
social_account.Lead__c = existing_lead.Id;
update existing_lead;
insert social_account;
}
I get this error:
554 System.DmlException: Update failed. First exception on line 0 with id 00Q3000000WW3isEAD; first error: CANNOT_UPDATE_CONVERTED_LEAD, cannot refer to converted output: []
Class.ProcessContact.handleInboundEmail: line 81, column 9 External entry point
even if I comment on "update existing_lead", I get a similar error message.
554 System.DmlException: Insert failed. The first exception on line 0; first error: CANNOT_UPDATE_CONVERTED_LEAD, cannot refer to the converted manual: [Lead__c]
.ProcessContact.handleInboundEmail: 82, 9
.