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

        • 554 5.2.3 MailPolicy violation Error, help?

          This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. 554 5.2.3 MailPolicy violation Error delivering to mailboxes I am not sure why i am getting this, please
        • Recover trash emails deleted by Zoho

          Three times in the past 6 weeks all emails have been deleted from trash. I have NOT accidentally deleted them myself--they literally disappear before my eyes. I have the trash folder set up to delete items after 30 days, but they have suddenly ALL disappeared
        • ERROR:554 5.1.8 Email Outgoing Blocked.

          Buen día Tengo un problema con una de mis cuentas de correo corporativo, investigue sobre el error, borre mensajes y el problema persiste. No se como puedo desbloquear mi cuenta de correo. El correo en cuestión es dinagramascentro@servicioslatinosltda.co
        • ME SALE ESTE ERROR: No fue posible enviar el mensaje;Motivo:554 5.1.8 Email Outgoing Blocked

          Ayuda!! Me sale este error al intentar enviar mensajes desde mi correo electronico de Zoho! Tampoco recibo correos pues cuando me envia rebotan. Ayuda, Me urge enviar unos correo importantes!! Quedo atenta MAGDA HERNANDEZ +5731120888408
        • Customer can't comment on SO or Invoice

          Hi I just saw that my customers are not able to submit a comment either on invoices or sales order. What happens if my customer hits submit is just nothing. only a red line appears on top of the page which probalby indicates an error. I'm not able to
        • Custom Button in Shipments

          Custom buttons feature is very much needed in shipments. Please work on this feature request!
        • Zoho mail is logging me out almost every day ?

          Yes I have clicked the Remember Me option. Yet I need to login again every 1 - 2 days, sometimes multiple times per day. The saved credential does not persist.  Using fairly clean Chrome.
        • Asap Widget 2.0

          Where's the documentation for the new ASAP widget? https://www.zoho.com/desk/developers/asap/#introduction this one is outdated How can we dynamically navigate between different views? How can we prefill ticket forms using ASAP 2.0?
        • DataPrep Bigquery Connection failed

          Hello everybody, I want to create a connnection beetwen Bigquery and Dataprep but when I try to connect my project I got this error Loading tables has failed. Table list fetched from the data source expired.
        • Can I add Conditional merge tags on my Templates?

          Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
        • Organization-Tiered Support in Zoho Corp Help Center

          Dear Zoho Team, Greetings! As the focal point for all Zoho-related matters in our organization, we would like to request the implementation of an organization-tiered support structure in the Zoho Corp Help Center (Zoho's internal Zoho Desk). This feature
        • HTTP Error 500 when creating E-Mail Draft with API

          Hi, I tried to create an email draft for a ticket using the Zoho Desk API (v1); however, I continuously receive HTTP Error 500: An internal server error occurred while performing this operation. I've tried both curl and Python implementations, but neither
        • Recording overpayment?

          So a customer just overpaid me and how do I record this? I can't enter an amount that is higher than the invoice amount. Eg. Invoice is $195 and he sent $200. He's a reccuring customer so is there a way to record so that he has a $5 advance for future invoice?
        • Function #10: Update item prices automatically based on the last transaction created

          In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
        • Calculate BMI

          Hello, Could you please help me with the following calculation: Height registration is in feet & inches. Weight registration is in pounds & LBS. I want to calculate the BMI for example: //Calculate pounds dec = row.Today_s_Weight_st_lbs.toDecimal() * 100; num = row.Today_s_Weight_st_lbs.toLong() * 14; pounds = (dec +  num); //Calculate inches dec1 = X.Height_ft_ins.toDecimal() * 100; num1 = X.Height_ft_ins.toLong() * 12; inches = (num1 + dec1); //BMI Calculation row.BMI = (pounds  *  0.45)  /  ((inches
        • Zoho Recruit - Blueprint and ZIA

          If I activate the Blueprint for Jobs in Zoho Recruit, Zia disappears for matching canddiates, why is that?
        • E-mails duplicados

          Ao enviar e-mails, uma das contas de nossos usuários, mostra dois e-mails enviados iguais. Como faço para exibir somente um e-mail enviado? Obrigado,
        • Zoho email setup in office365

          When i am trying to setup zoho mail setup using my domain in office365 and it is not working and it says that we couldn't log on to the incoming (IMAP) server and please check your email address and password and try again. I was able to login using my
        • Zoho Creator - Install app from Gallery takes too long

          I'm trying to install the 'Volunteer Portal' from the app Gallery of Zoho Creator. It has been busy installing the app for over 2 hours now. It might be okay, but how long is something like that supposed to take? I never installed anything from that Gallery
        • Why Trident?

          Maybe a strange question, but I was wondering why Trident is being developed. It looks fine and is working better and better, but I can't see what you want to achieve what isn't already in Zoho Mail? Zoho mail is already an (webbased I suppose) app that
        • Email não baixa nem anexa arquivos

          Boa tarde. Não consigo baixar, visualizar nem anexar arquivos no e-mail Zoho. Já baixei a permissão para o Chrome, mas não adiantou. Tentamos no Windows 7 e 10, e mesmo assim não baixa nada. Somente pelo app do celular consigo baixar. O que posso fazer?
        • Email zoho não baixa nem anexa arquivos

          Não consigo baixar, visualizar nem anexar arquivos no e-mail Zoho. Já baixei a permissão para o Chrome, mas não adiantou. Não baixa nada. Somente pelo app do celular consigo baixar. :(
        • Problem adding emails to my account / Email Address already exists or associated in another Organisation

          Hello, I am trying to create 3 emails that I previously deleted, but it gives me the message that you see on the screen below, I tried to write to support but I still have no response, what else can I do?
        • "Processing"

          Hi, All emails outgoing are showing "processing", any issues? Thanks
        • For each loop with available time slots

          I am very new to Deluge, and this question was unable to be answered by Zoho Creator tech support upon request. Task at hand: I have a Form with 4 fields: - Date Start - Date End - Dropdown: Time Start: contains time slots (12:00PM, 12:15PM, etc) - Dropdown:
        • Auto forward after moving email from spam to inbox

          Auto forward is generally working fine, however it does not forward mails landed in the spam folder. I can move important mails from spam back to inbox, is it possible to automatically forward them once they are in inbox? Obviously I can manually forward
        • Select CRM Custom Module in Zoho Creator

          I have a custom module added in Zoho CRM that I would like to link in Zoho creator.  When I add the Zoho CRM field it does not show the new module.  Is this possible?  Do i need to change something in CRM to make it accesible in Creator?
        • Projects Task List Bars not Showing

          Im in my Projects template and the grey bar for the Task Lists is not showing and the tasks cannot join to it. I have it open in a job and it works. Anyone know why its not showing in the template?
        • Restriction in assigning signer fields for the "Approver" role in APIs and internal integrations

          Hi, Zoho Sign's intended design is offering two actions to the recipient - Needs to sign (if you wish your recipient to add information to the document; signature, for instance) or Approver (someone who has to approve the content of the document and must
        • Searching Notes & Attachments

          Is it possible to have the search in CRM search the Notes and Attachments for key words
        • no me llegan los correos a Zoho mail

          No puedo recibir correos pero sí enviarlos, ya hice la modificación de MX y la verificación de teléfonos, qué es lo que ocurre? gracias
        • 553 Relaying disallowed SMTP Error: data not accepted

          I am configuring my website to use my zoho mail for my contact form. I am using phpmailer but this exits with the following error: SMTP ERROR: DATA END command failed: 553 Relaying disallowed SMTP Error: data not accepted. Mailer Error: SMTP Error: data
        • Rebrand your CRM with the all-new custom domain mapping setup

          UPDATES TO THIS FEATURE! 19th Jan, 2024 — Custom domain mapping has been made available for portal users in Zoho One and CRM Plus. 23rd June, 2023 — Custom domain mapping has been made available for all users, in all DCs. Hello everyone! We are elated
        • 'Find duplicates using :'

          I just discovered (and thought I would share) that you can import candidates to Zoho Recruit and define the field you want to use to find duplicates. I have used the email address all this time. But I think a better field to find duplicates is a contact's
        • Chart View group X-axis values above a value

          I have a data set with X values ranging from 0 up to 300-400, the Y values are an AVG of the values for the given X. I am interested in the values at the low end of the scale, say 0-10 and want the X values 10 and greater to be grouped into a single category
        • Territory management and roles hierarchy

          Hi everyone, we are facing a problem with territory management. Our roles hierarchy is quite simple: - Area sales managers - Sales executives (reporting to Area sales managers) - Backoffice "Sales executives" can see only accounts/contacts/etc based on
        • DataPrep Bigquery Connection failed

          Hello everybody, I want to create a connnection beetwen Bigquery and Dataprep but when I try to connect my project I got this error Loading tables has failed. Table list fetched from the data source expired.
        • Can Send Emails But I am not Receiving emails in Zoho Account

          Hello, I have configured a Zoho email account for the domain pentexqatar.com and I can send emails but am not receiving any emails in Zoho account. can I please let me know what could be the issues? Thank You
        • Disable Multiple Submissions by same Employee

          Dear All, I am creating a form to be filled by employees. Is it possible to restrict submission of the form if that employee has already submitted it once?
        • Whatsapp Notification For Cliq

          We have integrated WhatsApp Business into Zoho CRM, and messages are coming through to the CRM. However, I want a notification message to be sent to the data owner in Cliq when a new message arrives. This doesn't seem possible through rules. Is there
        • Next Page