Recording Meetings in Different Time Zone

Recording Meetings in Different Time Zone

Hi everybody!

I saw quite a lot of times that people are asking Zoho to have this functionality to record a meeting in a different time zone. While they did say they will forward this to the development team, we all know too well what that means. *wink2

If you're fine with a little bit of customization and custom function, I have just the thing for you. This will allow you to still have the meeting recorded in your own respective time zone, but, at the same time, you can see what time is it in the selected time zone. You can use it in almost anything; a button, a workflow, etc. 

Note: Custom functions are available only for Enterprise edition onwards

Here goes.

Firstly, you have to add a custom picklist field in the Meetings module called Time Zone. In this field, get the list of supported time zones here, Supported Time Zones | Help - Zoho Deluge

Please note that there are more than 500 timezones listed and a picklist can only hold 500 values. so pick and choose the ones you frequently use only.

Then, create a workflow that triggers on the creation of a meeting and use this custom function. Please click on Edit Arguments and map "recId" to the Meeting Id like so:


Then write this function:
  1. //get info from the meeting record
  2. recInfo = zoho.crm.getRecordById("Events",recId);
  3. startDateTime = recInfo.get("Start_DateTime");
  4. endDateTime = recInfo.get("End_DateTime");
  5. timeZone = recInfo.get("Time_Zone");
  6. info timeZone;
  7. // info now;
  8. info startDateTime;
  9. //adjust start date/time
  10. startDateTime = startDateTime.toString();
  11. lenWithoutStart = startDateTime.length() - 6;
  12. startDateTime = startDateTime.subString(0,lenWithoutStart);
  13. startDateTime = startDateTime.replaceAll("T"," ");
  14. adjustedStartDateTime = startDateTime.toDateTime().toString("yyyy-MM-dd'T'HH:mm:ss",timeZone);
  15. info adjustedStartDateTime;
  16. //adjust end date time
  17. endDateTime = endDateTime.toString();
  18. lenWithoutEnd = endDateTime.length() - 6;
  19. endDateTime = endDateTime.subString(0,lenWithoutEnd);
  20. endDateTime = endDateTime.replaceAll("T"," ");
  21. adjustedEndDateTime = endDateTime.toDateTime().toString("yyyy-MM-dd'T'HH:mm:ss",timeZone);
  22. info adjustedEndDateTime;
  23. //update meeting record
  24. mp = Map();
  25. /*----if you want to update the original start/end datetime, uncomment the below 2 lines----*/
  26. // mp.put("Start_DateTime",adjustedStartDateTime);
  27. // mp.put("End_DateTime",adjustedEndDateTime);
  28. /*----if you want to store the start/end datetime in other fields, create the date/time fields and update them. In this case, Time_Zone_Start_Time and Time_Zone_End_Time are the API names of the custom field I created----*/
  29. mp.put("Time_Zone_Start_Time",adjustedStartDateTime);
  30. mp.put("Time_Zone_End_Time",adjustedEndDateTime);
  31. updStartTime = zoho.crm.updateRecord("Events",recId,mp);
  32. info updStartTime;
Please read the notes and disclaimer I put in the code above. If you choose the second route as suggested above, you would see something like this. Please note that my timezone is MYT, and this code changes it to Paris timezone; in case you want to check it.


Now, you can reuse this custom function to for other workflow you want to use. For example, whenever the From and To field changes, you want to trigger this as well. Or, when you change the timezone, you want the same to be done. 

Hope this helps.

Goodluck!

Nik, aplikasi.us
Zoho Authorized Partner