I am trying to write the leadConversionResult error message to a custom field. As you can see I already write the error to the debug log. When I attempt to assign to a text field I get the following error message:
Illegal assignment from List to String
Here is my code:
if(!leadConvertResult.success){
system.debug('The Following Error Occurred on::' + leadConvertResult.getLeadId() + 'Error is::' + leadConvertResult.getErrors());
Lead L = new Lead(id = leadConvertResult.getLeadId());
L.AutoConvert__c = FALSE;
L.Possible_Duplicate__c =TRUE;
L.Conversion_error_message__c =leadConvertResult.getErrors();
if(L.Ignore_Duplicate_error__c == FALSE){
DuplicateLead.add(L);
}
}