[SalesForce] Failed to invoke future method

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!

Best Answer

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

Related Topic