Questions tagged [querylocator]

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

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
1answer
171 views

Read access denied: getQueryLocator(soql) vs. query(soql)

I am attempting to add pagination, and I followed this great article by Jeff Douglas. I am an admin so when I run the page it runs great, I can navigate forwards, back. When I log in as a user my ...
3
votes
2answers
41 views

QueryLocator crashes after casting to Iterable and executing .iterator()

So here is some simple code that does work: Database.QueryLocator ql = Database.getQueryLocator('SELECT Id FROM Account LIMIT 2'); Iterator<SObject> iter = ql.iterator(); Ok. But suppose I ...
3
votes
0answers
104 views

Execute Method in Batchable Class does not execute on all records returned in Start method Querylocator

I am seeing a very similar issue to the one discussed in this question, which was due to a bug in Spring '17. The Querylocator returned by the Start method returns 9,989 records, which I can verify ...
1
vote
0answers
50 views

How can I work with both QueryLocator and List<SObject> in a single batch class (not a single instance)?

I've been working on a chainable batch class. The constructor can take in either a service & query or a service & list of records. In almost all cases, the service/query are passed in. In ...
1
vote
0answers
90 views

INVALID_QUERY_LOCATOR on queryMore on node js

I m getting INVALID_QUERY_LOCATOR error on using queryMore operation using the Enterprise WSDL on node js. Below is the code client.query({queryString:"Select Id,Name FROM Account ORDER BY Name"},...
1
vote
0answers
214 views

Database.querylocater on external object in batch class not returning any rows

I am writing a batch class on external object. Here I am using database.getQuerylocator in start method as the result will contain more thank 50k records. Batch class code: global class <...
1
vote
0answers
124 views

QueryLocator timeout problem?

I have a StandardSetController that I navigate through pages... from a VF page. However, if I let the web page sit for around 15 min or so (not sure about the time) and then try and click the next or ...
1
vote
0answers
57 views

Get count of open Query Locators

For debugging porpuses, we would like to get the count of the open "QueryLocators" for an organisation.Is this possible somehow? Thanks
0
votes
0answers
9 views

How to add conditions in a Batch class when there are n no of clauses

I want to add a clause in the query locator for billingCountry. The commented code runs fine but is there a way to do the same using the NOT IN clause ? I commented line 14,15 and trying to use line ...
0
votes
1answer
24 views

How can I make my <account> variable filterType equal to the first account returned in a StandardSetController Query?

how would this work with a dynamic search page I have a visual force search page and I have used the stadardsetcontroller for pagination. The initial query during page load is working for me. ...
0
votes
1answer
96 views

Batch Apex ignores records even without subquery in start()

Basically the querylocator returns about 200000 records at the start, I can see it in logs, also there are not any errors or limits warnings. The size of each job matters because the smaller it is,...