Want a faster way to add call logs? Check out this video that shows you how to add call logs by ticking a box. (Warning: Enterprise Edition + deluge scripting skills needed).
Recently I was working on a custom function for Zoho CRM which required me to get the current time in a specified timezone. I assumed that zoho.currenttime would give me the time based on the timezone chosen in the organisation settings but discovered that it always gives it to you in PST. The Zoho Partner team gave me this snippet to solve the problem: current_time_in_timezone = zoho.currenttime.toString("yyyy-MM-dd'T'HH:mm:ss", "Australia/Sydney").toTime("yyyy-MM-dd'T'HH:mm:ss"); If you need the current date, do: current_date_in_timezone = zoho.currenttime.toString("yyyy-MM-dd'T'HH:mm:ss", timezone).toDate(); To figure out what you can put in for the timezone part, refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Hi Jeremy thank you for the script, worked really well for me. I cannot code and simply copy / pasted the script. But when I tried to use the script with a custom button within the leads module (for instance to create a call log "occupied" with the click of a button) it returns an error: "Error at line number : 1
ReplyDeleteMismatch data type for function zoho.crm.getRecordById at argument index 2 expected data type BIGINT found dataType STRING"
Can you help? Thx Jens
Hi Jens,
Deleteyou'll need to change it to
lead_obj = zoho.crm.getRecordById("Leads", input.lead_id.toLong());
if using in a custom button as the parameters are all Strings rather than numbers.
Fantastic! Thank you Jeremy :)
Delete