Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
19k views

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
1k views

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
2k views

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
1k views

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