Created
May 23, 2022 23:51
-
-
Save jeznag/177b35b9f9f8ca5658150992226844ef to your computer and use it in GitHub Desktop.
automatically close tasks for a lead in Zoho CRM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
outstanding_tasks_to_close = zoho.crm.getRelatedRecords("Tasks","Leads",lead_id); | |
for each task in outstanding_tasks_to_close | |
{ | |
if(task.get("Status") != "Completed") | |
{ | |
update_payload = {"Status":"Completed"}; | |
update_resp = zoho.crm.updateRecord("Tasks",task.get("id"),update_payload); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment