Skip to main content

Questions tagged [querylocator]

Represents the record set returned by Database.getQueryLocator and used with Batch Apex.

Filter by
Sorted by
Tagged with
10 votes
2 answers

Exception: QUERY_TIMEOUT Your query request was running for too long

Querying on approx 25 million contacts using the following query in database.getQueryLocator. Used Query Resource Feedback (Link) to get some feedback about query and here are the results. Query - 1: ...
sf_user's user avatar
  • 2,260
5 votes
2 answers

What kind of actions open a query locator

We use a batched approach for read and update CampaignMember records within an external application (Webservice Connector, or WSC SOAP API). The approach can be described like this: Query campaign ...
lgraf's user avatar
  • 443
1 vote
2 answers

How to Delete Records in a object except Newly created 1000 Records by using Batch Class?

I have a question, how to delete all records except newly created 1000 records(For Eg: in a Account Object i have 11000 records,in that 1000 records are created in this month, now all 10000 records ...
user avatar
0 votes
2 answers

Query exception - Unexpected token '{'

I have below query string in an apex batch class that throw error. Can some one please help? Error Unexpected token '{' Query String String query = 'SELECT Call_Duration_Required_abv__c,Id FROM ...
Testing_SFDC's user avatar
  • 2,950