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
JJoshJLJJoshJL 

Querymore

I am having a problem that I can't seem to understand why it is occuring. I have a script that is attempting to manipulate about 6000 records. It requires 3 pieces of information from salesforce, each in a differant table. In any case, if I run a raw count gathering just the first peice of data, It will go through all 6000 records without any issues. However, When I add in the second and third queries to the equation, I get the invalid query locator error... The two subqueries will never return more than 1 result based on how the query is set up, so I cant be getting the query locator error from that. In anycase, any assistance will be greatly appreciated..

While bool

For b = 0 To qr.records.GetUpperBound(0)

....

code

....

If qr.done Then

bool = False

Else

qr = binding.queryMore(qr.queryLocator)

End If

 

 

API 5  VB.net environment

Cheers

Josh

dhruvadhruva
Is it possible that even though there are no more records to query, you are still setting querylocator to the last sub-query (which is emptiness, which is invalid for the next query)? Try printing querylocator after each sub-query.
JJoshJLJJoshJL

Good call... I'll have to check that.

Thanks