1

I am getting this error

Failed to invoke future method 'public static void GeoCodeAddressFutureForLeads(Set, String)' on class 'Helper_GeoCode' for job id 'XXXXXXXXXXX'

caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_UPDATE_CONVERTED_LEAD, cannot reference converted lead: []

Please point out if anyone having solution. Thanks in advance!

  • Shilpa, maybe you could explain what your code is doing and whether you understand the message or not ? Please consider that if you don't actually ask a question and enable us to understand the origin of it, it's hard to help you. – Samuel De Rycke Feb 17 '15 at 12:25
3

@Ashwani is right. You can put a where isConverted = false clause in the query for lead.

1

According to the error the Lead record you are trying to convert is already converted. Converted Lead record cannot be updated.

The Lead object has an IsConverted field by which you can check to see if it has been converted or not.

In the error message you can see:

cannot reference converted lead

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.