How to add/remove tag to a ticket with function?
Hi,
I have had to create a function in Zoho Desk. However, it appears that the syntax differs from that in CRM.
I realized that it is necessary to add organization ID in some commands what is not necessary when you create a funciotn in CRM.
Could you help me with adding and removing tags? Here is the code:
- ticketData = zoho.desk.getRecordById(orgID,"Tickets",Ticket_Id);
- // Can I get the realted Contact with the following command?
- contactData = zoho.desk.getRecordById(orgID,"Contacts",contactId);
- if(contactData.get("TRIAL") != null)
- {
- trialDate = contactData.get("TRIAL");
- if(trialDate.toDate() >= zoho.currentdate)
- {
- ticketTags = ticketData.get("Tags");
- ticketTags.add("TRIAL");
- ticketData.put("Tags",ticketTags);
- zoho.desk.update(orgID,"Tickets", ticketData.get("id"), ticketdata);
- }
- }
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.