First error: ConvertLead failed. First exception on row 1; first error: INVALID_STATUS, invalid convertedStatus: Qualified: [Status]
after another API version update there is a new field representing closing status. instead of MasterLabel
you should use ApiName
, they may differ.
so the code snippet inside mergLeadWithExistingAccount()
method should look like:
LeadStatus convertStatus = [SELECT Id, ApiName FROM LeadStatus WHERE IsConverted=true LIMIT 1];
lc.setConvertedStatus(convertStatus.ApiName);