You need to sign in to do that
Don't have an account?
Lee Vaknin
INVALID_QUERY_LOCATOR when using nextRecordsUrl
Hi,
I have an issue while I'm trying to get campaigns members using SOQL.
I get the following error in the middle of the process when using nextRecordsUrl -
[{"message":"invalid query locator","errorCode":"INVALID_QUERY_LOCATOR"}]
please advice. Thanks!
I have an issue while I'm trying to get campaigns members using SOQL.
I get the following error in the middle of the process when using nextRecordsUrl -
[{"message":"invalid query locator","errorCode":"INVALID_QUERY_LOCATOR"}]
please advice. Thanks!
Few this which needs to be cause for exception.
>> Too much data for a single query. Try to limit the data.
>> You've exceeded your allowance of having max 5 query locators open.
>> Exceeded 10-minute inactivity timeout of a queryLocator.
Review below link for 'INVALID_QUERY_LOCATOR' error
https://help.salesforce.com/articleView?id=000323582&language=en_US&type=1&mode=1
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
Thank you for your answer.
Regarding your first advice (limit the data) -
What is the best way to limit the data? And what should be the limit?
Thanks again.
Data limit in a single query mean to say you can add few filter conditions like WHERE/LIKE etc to reduce the record count when you run a query.
Thanks,
Vinay Kumar
You could add more filter conditions in your SOQL where logic.
Thanks.