Deluge help - Looping in Zoho CRM

Deluge help - Looping in Zoho CRM

Hi! I am trying to create a function and struggling as I cannot get the function to repeat without. breaking.

Trying to write a function (currently doing through schedule) to run daily. Searching for tasks that are 90 days or more overdue. If task is 90 days or more over due the Task Owner will change to a new user (specific user id supplied in code). 

The problem is the 200 record limit. How do I get this to loop? 

1. Testing based on 1 users tasks (script below) to another specific user id
2. Once the first script works I want to implement it to all users across the organization


void schedule.Test_Overdue_Tasks()

{

tasks = zoho.crm.getRecords("Tasks",1,200);

today = zoho.currentdate;

overdue_threshold = today.addDay(-90);

for each  task in tasks

{

due_date_str = task.get("Due_Date");

if(due_date_str != null)

{

due_date = due_date_str.toDate();

info "Task ID: " + task.get("id") + ", Due Date: " + due_date + ", Overdue Threshold: " + overdue_threshold;

if(due_date <= overdue_threshold)

{

// Modified to include exactly 90 days overdue

owner_field = task.get("Owner");

// Fetch Owner field directly

if(owner_field != null && owner_field.containsKey("id"))

{

owner_id = owner_field.get("id");

expected_owner_id = "4736246000017109001";

// Expected owner ID

info "Task " + task.get("id") + " current owner ID: " + owner_id;

if(owner_id == expected_owner_id)

{

update_map = Map();

owner_map = Map();

owner_map.put("id","4736246000001133001");

// New owner ID

update_map.put("Owner",owner_map);

update_response = zoho.crm.updateRecord("Tasks",task.get("id").toLong(),update_map);

if(update_response.get("status") == "success")

{

info "Task " + task.get("id") + " ownership updated successfully.";

}

else

{

info "Failed to update Task " + task.get("id") + ". Error: " + update_response.get("message");

}

}

else

{

info "Task " + task.get("id") + " does not belong to the specified owner. Expected: " + expected_owner_id + ", Found: " + owner_id;

}

}

else

{

info "Task " + task.get("id") + " Owner field structure: " + owner_field;

info "Task " + task.get("id") + " does not have a valid Owner id.";

}

}

else

{

info "Task " + task.get("id") + " is not overdue.";

}

}

else

{

info "Task " + task.get("id") + " does not have a Due_Date.";

}

}

}



      • Sticky Posts

      • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

        Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
      • Custom Function : Automatically send the Quote to the related contact

        Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
      • Function #50: Schedule Calls to records

        Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM
      • Function #37: Create a Purchase Order from a Quote

        Welcome back everyone! Last week, we learnt how to calculate the total number of activities for a lead and further take note of the activity count for particular dates. For instance, from the period of Demo to Negotiation. This week, let's look at a function that lets you create a Purchase Order instantly from a Quote. Business scenario: In any form of business, one of the most important things to do is to document the transactions. Naturally, negotiation, signing an agreement, placing an order,
      • Function-2: Round-Robin assignment of records

        Welcome back folks! Last week, we saw how to update sales commission in quotes using a custom function. This week, let's see an interesting use case asked by many of you - auto-assignment records by round-robin method. Business scenario: Right now, the solution allows you to auto-assign leads from web form and imported lists. Let us look at a need where you want to auto-assign leads from in-bound calls in a round-robin method, across modules. Prerequisite: You must create a permanent record in the

        • Recent Topics

        • (MAJOR ISSUE?) Chat GPT integration. Wrong endpoints in API integration for embedding models.

          There seems to be a issue with the API endpoints with the ChatGPT, Zoho Flow integration. When using the model 'text-embedding-ada-002' the endpoint should be v1/embeddings but instead it's v1/chat/completions. Here's an example of the history on a failed
        • Undocumented System Variables

          Hi, The documentation that I'm aware of for Zoho Analytics system variables is found here. However, I don't see the system.timeline.date.from and system.timeline.date.to variables listed. Where can I find a list of all the system variables in Zoho Analytics
        • Top Menu Disappeared from Blog Page

          Hi, Our top menu disappeared at Blog Posts page. However, it's still visible any other page on the website. I attached two screenshots, so it can be understood clearly. How can we bring back top menu? Thanks, K.
        • UK payroll entries

          Hey guys, Nett payroll payments are imported direct into the bank, using an external payroll system (will be glad for Zoho to have a UK payroll app) At present I have monthly recurring bills for HMRC which are auto entered & paid when due. This seems
        • Calculating Active Months and Recurring Monthly Revenue

          Hi everyone, as part of my offering I have a membership community that people pay monthly for. This is hosted on Squarespace. In my Zoho CRM I have added a field for the date a person becomes in active. This means there is a "closing date" which is the
        • Accounting on the Go Series:58-Effortless Compliance: Download XML for Invoices & Credit Notes on Mobile

          Hi there! In Mexico, XML files are crucial for electronic invoicing and fulfilling SAT (Tax Administration Service) requirements. These files ensure your transactions are accurately recorded and tax-compliant. Now, you don’t need to rely on the web app
        • Zoho Developer Community Monthly Digest - November 2024

          Hello everyone! Welcome back to the November edition of the Developer Community Monthly Digest. Dive in to explore the upcoming events, hands-on training sessions, exciting product updates, insightful discussions, and more to keep you informed and inspired!
        • Process FOR loop for subform items in the order of the manual sorting

          Hi Guys, I have searched everywhere and tried everything, but I still not able to resolve one particular challenge. I have a subform in my Invoice with rows for each item. I made it so that we can change the order of the items manually. I need to be able
        • Address Input and Map Functionality Challenges in Zoho: Need Advice

          I just started using the Zoho ecosystem for my business. Everything seems to be working fine, except for the map features built into the applications. It's quite difficult to input an address when creating a new lead. Some of you might suggest using extensions
        • Accounting on the Go Series-57: Effortlessly Add and Manage Bank Accounts from the Zoho Books Mobile App

          Hi all, Great news for our users in the US and Canada! Managing your finances just got a whole lot easier. Zoho Books has always made it seamless to integrate bank accounts and fetch feeds automatically. Now, we’re taking it up a notch—directly from the
        • Foreign currency Bank Account month end revaluation

          I have a question i have 2 bank accounts one in USD and the other in EUR , how to make the month end journal entries for exchange rate revaluation , also how to maintain the exchange rates daily on Zoho books for the foreign currencies . I made transfer
        • Zoho Forms Integration with Sign

          Hi there, following recent feedback that Zoho Sign is really not very useful friendly when using a mobile device I am exploring integrations with Zoho Forms. I have managed to create a form and integrate this into Sign pretty easily when a form is just
        • [Free Webinar] Creator Tech Connect Series - Product Release Updates in Zoho Creator

          Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar that runs for around 45 minutes. It comprises technical sessions in which we delve deep into
        • Need code format to specify default values

          Can someone please direct me to the code syntax or the proper translation per the instructions circled below. These instructions don't seem correct.
        • A quicker way to provide accountants access to Zoho Books, similar to Xero and Quickbooks

          Hey guys, I'm finding the procedure to give access to an external accountant to Zoho Books less than ideal. Having to create an account by Zoho instead of myself, and then wait for it to be given a license to then pass to the accountant seems a bit time
        • Introducing color coding feature of picklist fields in Meetings

          Dear All, Greetings! As part of the ongoing UI enhancement, we are excited to introduce color coding of picklist fields in Meetings. 'Meetings' is a great way to collaborate with peers and stay productive. You can block the calendar, invite participants,
        • Importing old Invoices into Zoho Books - Hitting the limit

          I'm currently working on importing historic invoices and payments made records from one Zoho Books premium instance into another however i'm hitting the 25,000 per year limit issue, these invoices go all the way back to 2019, and i understand that generating
        • Accounting on the Go Series-56: e-Way Bill Module in the Mobile App – A Handy Solution for Indian Businesses

          Hello everyone, Managing e-Way bills just got more convenient with the Zoho Books mobile app! For businesses operating under the GST regime, e-Way bills are essential for tracking the movement of goods. Previously, you had to log in to the web app to
        • Why Zoho Campaigns have massive more limitations like other software?`

          Hello, it was a time we managed +300 zoho campaigns accounts. But after only 3 years we handle now only +70 accounts. The reason? Because other solutions integrate much faster new functions. And not only this: They do not only release a new function -
        • Limit tasks per due date

          I am trying to figure out a way to limit the number of Tasks users can set on any given due date. But the number of tasks will differ for different users. Example - User 1234 will be permitted 100 tasks on each due date User 5678 and User 9012 will be
        • ZOHO CRM API changing timestamp format

          I'm working on integrating ZOHO CRM API with USM anywhere. USM anywhere supports only a few timestamp formats. the current timestamp format( yyyy-MM-ddTHH:mm:ss±HH:mm) is not supported by USM. Is there a way I can change this format to for example(yyyy-MM-ddTHH:mm:ss)?
        • Formula field update

          In a Blueprint, I have a stage called 'Plan inspection date'. At this point there is a fork, which depends on the number of days between now and the installation date. If there are less than 21 days, then the inspection should be planned urgently, if
        • Automating Employee Birthday Notifications in Zoho Cliq

          Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
        • Accounting on the Go Series-55: Seamlessly Add New Vendors While Creating Transactions from Scanned Documents

          Hi there! We’ve made handling documents and vendors in Zoho Books even simpler. Now, when you upload a document and scan it, if the app detects a vendor that isn’t already in your organization, you don’t have to leave the page to add them manually. With
        • Surpress Zoho warnings in Customer Portal

          I'm experimenting with the Customer Portal. When I log in as a customer, this message shows up, completely covering the menu bar at the top. Can such messages be surpressed? I know, it is very easy to get rid of it, but when I demonstrated the portal
        • Default Sorting on Related Lists

          Is it possible to set the default sorting options on the related lists. For example on the Contact Details view I have related lists for activities, emails, products cases, notes etc... currently: Activities 'created date' newest first Emails - 'created
        • Send email to all contacts related to a module

          My use case: I have a module named products, the records of which contains a related list of contacts associated with subscribing to that product. In cases where i need to trigger emails manually to give specific unprecedented updates of that product,
        • Function #28: Automatically calculate Customer Loyalty points

          Hello everyone, and welcome back to our series! Today, we're excited to share a workflow designed to streamline the management of loyalty points. Many businesses offer incentives or rewards in the form of loyalty points to their customers as a way to
        • Custom Modules Support for Zoho Creator Integration

          The title says it all. We have to create custom coded widgets for every little thing because this is not supported. Zoho Creator does not support custom modules. Zoho Forms does not support Multi-select-lookups. The point of Zoho is to not have to code
        • C# SDK net8.0 compatibility

          The NuGet packages seem to be targeting .net4.6.1 only. Are there any plans to target .net8.0, which is the current LTS version? Which package should I be using to interact with the API when targeting .net8.0, if any? If the SDK does not readily support
        • Notifications

          I am facing a problem with notifications, the mobile crm app does not notify me at all for any mail, task, activity, ... etc., the web is slightly better as i can see a notification on the bell icon however with a delay from real time and without a sound,
        • Disable All

          I want to disable all the fields on the form when it loads.  I know there is a way to do this by listing all the fields as follows: disable Name; disable Address; disable City;  ... I have over 50 fields on my form and i am wondering if there is a single command or way to just disable all fields on load.   On load = disable All Thank you for any help.  
        • Dialing Microsoft Teams Phone Service via Zoho CRM

          I am using the VOIP option in Microsoft teams for my office phone system. I was hoping to have a way to dial numbers directly from Zoho CRM, but don't see anything in the Teams Integration or in the Telephony integration that will enable this. Does anyone
        • Zoho Mail - CRM Widget

          When I click on Associate this email to a contact within the CRM widget, I get "Oops! Something went wrong". This happen when I try to associate an email in a shared mailbox. The widget detect correctly the contact and show his informations from the CRM
        • Kanban View for Projects.

          At our organization, we describe active projects with various statuses like "In Proofing" or "Printing" or "Mailing". In the Projects view, one can set these project statuses by selecting from the appropriate drop-down. While this works, it's difficult to view and comprehend the progress of all of your projects relative to each other in a table. Creating a Kanban view for projects where I can move them from one status to another allows me to see where each project is in the order of our workflow.
        • Feature request - export as video

          Export presentation as video. I think that it would be super useful for many users. Thanks
        • Display Company Logos in Pipeline View

          To improve deal management and enhance usability, we propose adding the option to display the associated company's logo directly in the pipeline view. Currently, users can only see the deal owner's avatar, but having the company's logo would make it easier
        • Attention: Scheduled Maintenance at US DC on Dec 19, 2024

          Dear Bookings users, We would like to inform you that we've scheduled maintenance activity at our US data centers on Thursday, December 19th, 2024, from 5:30 PM to 5:45 PM PT. During this period, Zoho Bookings will be completely unavailable for the accounts
        • StatusIQ

          Please add StatusIQ to data sources. We using site24x7 and StatusIQ together and site24x7 integration is already there. Thanks and regards, Torsten
        • Set Display for Numbers/Currency/etc with Client Script/Customization in Canvas List Page

          Is it possible to set a display mask for a number/currency field using Client Script or customization? I have custom fields that I would like to keep the decimal places for calculation purposes, but do not need them displayed to the user. So 101.3568
        • Next Page