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
THustonTHuston 

Partner API QueryResult.isDone incorrect for lots of children

AccountQR = binding.query("select name, (select lastname from Contacts) from Account where name = 'State Street'");

 

If 'State Street' has more than batchsize-1 (199 - 1999) Contacts, then Account's QueryResult.isDone() will show FALSE.

It should be TRUE since the one and only Account SObject record has been returned.

 

Only the Contacts' QueryResult should show as incomplete.

AccountQR.getRecords()[0].get_any()[1].getObjectValue().isDone()==false

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
There's a particular edge case that causes this, but its not a problem, as you can call queryMore on the outer querylocator, and it'll return a new query result with no records and done == true.

All Answers

SuperfellSuperfell
There's a particular edge case that causes this, but its not a problem, as you can call queryMore on the outer querylocator, and it'll return a new query result with no records and done == true.
This was selected as the best answer
THustonTHuston
Yeah, I was hoping to avoid the required extra queryMore and null comparison, but it is a valid solution.