Pagination help

Pagination help

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!!
  1. // Search for accounts with specific criteria (e.g., names starting with "SDX")
  2. accounts = zoho.crm.searchRecords("Accounts","(Account_Name:starts_with:SDX) and (Division:equals:" + input.Sodexo_Segment + ")");
  3. //accounts = zoho.crm.searchRecords("Accounts","(Account_Name:starts_with:SDX)");
  4. // Initialize a list to store account names
  5. accountNames = List();
  6. accountNames.add("New Account");
  7. if(accounts != null && accounts.size() > 0)
  8. {
  9. for each  account in accounts
  10. {
  11. accountNames.add(account.get("Account_Name"));
  12. }
  13. }
  14. else
  15. {
  16. // Handle case where no accounts match the criteria
  17. info "No accounts found with the specified filter.";
  18. }
  19. // Populate the dropdown with filtered account names
  20. for each  name in accountNames
  21. {
  22. input.AccountsDD:ui.add(name);
  23. // Add each name to the dropdown
  24. }