Hello everyone. I have this code below that gets all accounts based on specific criteria. I just discovered that it's not pulling in all of the accounts due to the 200 item limit. I've been trying to follow some pagination examples but can't seem to figure it out. Has anyone done pagination with getRecords? If so would you mind assisting me? FYI this is deluge in Creator. Thank you!!
- // Search for accounts with specific criteria (e.g., names starting with "SDX")
- accounts = zoho.crm.searchRecords("Accounts","(Account_Name:starts_with:SDX) and (Division:equals:" + input.Sodexo_Segment + ")");
- //accounts = zoho.crm.searchRecords("Accounts","(Account_Name:starts_with:SDX)");
- // Initialize a list to store account names
- accountNames = List();
- accountNames.add("New Account");
- if(accounts != null && accounts.size() > 0)
- {
- for each account in accounts
- {
- accountNames.add(account.get("Account_Name"));
- }
- }
- else
- {
- // Handle case where no accounts match the criteria
- info "No accounts found with the specified filter.";
- }
- // Populate the dropdown with filtered account names
- for each name in accountNames
- {
- input.AccountsDD:ui.add(name);
- // Add each name to the dropdown
- }