Deluge Function to Update Custom Field

Deluge Function to Update Custom Field

I'm trying to get a Deluge function (which will run as part of a Schedule in Desk) that retrieves all tickets with the status "Recurring" and updates the custom field checkbox "cf_recurring" to "true". Here's what I have, which doesn't work:

  1. searchValue = {"status":"Recurring"};
  2. response = zoho.desk.searchRecords(ORGID,"tickets",searchValue,0,100);
  3. for each rec in response
  4. {
  5.         info rec;
  6. recordValue = {"cf_recurring":"true"};
  7. update = zoho.desk.update(ORGID,"tickets",rec.get("id"),recordValue);
  8. }
This line:
  1. info rec;
properly returns a ticket. However I get the following when it gets to
  1. rec.get("id");
as though it's trying to lookup a numbered index item in a List collection, rather than a keyed index item in a Key-Value collection:
  1. Data type of the argument of the function 'get' did not match the required data type of '[BIGINT]'
I have done various smaller code pieces to determine that's definitely where that error is coming from. Also, I do have my actual organization ID where "ORGID" appears in the code I shared, so it does definitely retrieve an actual ticket that I verified has actual data.

I'm not sure what is causing the error or how to fix it. Any ideas?
    • Sticky Posts

    • Zoho Desk Partners with Microsoft's M365 Copilot for seamless customer service experiences

      Hello Zoho Desk users, We are happy to announce that Zoho Desk has partnered with Microsoft's M365 to empower customer service teams with enhanced capabilities and seamless experiences for agents. Microsoft announced their partnership during their keynote
    • Live Webinar - Work smarter with Zoho Desk and Zoho Workplace integration

      Hello customers! Zoho Desk and Zoho Workplace are coming together for a webinar on 14th May, 2024. Zoho Workplace is a suite of productivity apps for email, chat, docs, calls, and more at one single place. Zoho Desk is closely integrated with a few tools
    • Apple iOS 17 and iPadOS 17 updates for Zoho Desk users

      Hello Zoho Desk users! Apple recently announced the release of iOS 17 and iPad OS 17. These latest OS updates will help you stay productive and efficient, through interactive and seamless user experiences. Zoho Desk has incorporated the updates to help
    • Zoho Desk Cheat Sheet For The Year-End

      Check out these Zoho Desk best practices to end this year on a high and have a great one ahead! #1 Set Business (Holiday) Hours - If you have limited working hours, please make sure you restrict your business hours or set them as holidays for the coming days. Let your customers know when you will, and won't, be available. #2 Update the Annual Holiday List - Check the holidays for the new year and update the holiday schedule. Usually, holidays from the current year will be carried over for the next
    • Deprecation of older versions of ASAP Mobile SDK | Zoho Desk

      Hello, everyone.    Greetings from Zoho Desk ASAP!   In order to continue to deliver the best and most secure experience to our mobile SDK users. On account of the recent enhancements and updates to the mobile SDKs, we have planned to mark the older versions