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!

1
  • 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. Feb 17, 2015 at 12:25

2 Answers 2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .