function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
orikkerorikker 

Help :Unable to find query cursor data for this QueryLocator, please retry your query.:

I am updating 23000 records. Trigger is supposed to update a lookup Contact field FA_Name__c . There are about 40000 contacts, but not all of them would meet the criteria in the code... here is the error and the code...

 

Batch data load fails about 1900 records with error UNKNOWN_EXCEPTION:Unable to find query cursor data for this QueryLocator, please retry your query.:--

 

Plus a warning email.

 

Operation: N/A

 

By user/organization: user/org

 

Caused the following Apex resource warnings:

 

Number of query rows: 46557 out of 50000

 

 

Ritesh AswaneyRitesh Aswaney

It might be trying the 

for(List<sObject> sObjList : [Select......])

format of processing records a shot, as Salesforce batches up records and you might be able to work around this.