how to get more than 2000 records using COQL?
I am using this query below to get the first 2000 records using COQL:
- SELECT Deal_Name, id from Deals WHERE Created_Time between '2024-08-06T00:00:00+07:00' and '2024-10-07T23:59:59+07:00'LIMIT 2000
I send request using this code
var data = {
'select_query': query,
};
var headers = {
'Authorization': "Zoho-oauthtoken " + accessToken
}
var options = {
'method' : 'post',
'contentType': 'application/json',
'payload' : JSON.stringify(data),
'muteHttpExceptions': true,
'headers': headers
};
var response = UrlFetchApp.fetch(url, options);
var responseCode = response.getResponseCode();
and then I check if it has more records available or not using the code below:
var json = JSON.parse(response.getContentText());
var hasMoreRecords = json.info.more_records;
if hasMoreRecords == true then I need to fetch the next 2000 records using the query below:
- SELECT Deal_Name, id from Deals WHERE Created_Time between '2024-08-06T00:00:00+07:00' and '2024-10-07T23:59:59+07:00'LIMIT 4000, 2000
but I got 204 as response code, which means I don't have any other record available even though I actually have more than 2000 records.
so how to get the next 2000 records using COQL? I suspect I write the query wrong
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.