Monday, April 2, 2018

Updating Zoho CRM event participants via Deluge script

Helpful tips from Ajeet from the Zoho partner team that I couldn't find documented anywhere:

Replace xxxxxx with event id
Replace yyyyy with contact id

resp = zoho.crm.getRecordById("Events", xxxxxx);
partlist = List();
partmp = map();
partmp.put("type","contact");
partmp.put("participant",yyyyy);
partlist.add(partmp);
mp = map();
mp.put("Participants",partlist);
update = zoho.crm.update("Events", xxxxxxx, mp);
info update;
info partmp;

However, this will work in such a way that, let's say there is an event with existing participants, on using this code to update participants, the existing participants will be removed and new participants updated via API will be included.

Sincerely, 

Ajeet | Partner team.