Created
May 31, 2015 08:35
-
-
Save jeznag/0baf6f2fe9f54857bfb7 to your computer and use it in GitHub Desktop.
Add call log to Zoho CRM lead
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
void workflowspace.add_call_log(int lead_id) | |
{ | |
lead_obj = zoho.crm.getRecordById("Leads", input.lead_id); | |
lead_name = ((lead_obj.get("First Name")) + " ") + lead_obj.get("Last Name"); | |
lead_company = lead_obj.get("Company"); | |
call_log_obj = map(); | |
call_log_obj.put("Subject", "Call with " + lead_name); | |
call_log_obj.put("Call Type", "Outbound"); | |
call_log_obj.put("SEMODULE", "Leads"); | |
call_log_obj.put("SEID", input.lead_id); | |
call_log_obj.put("Call Start Time", zoho.currenttime.toString("yyyy-MM-dd HH:mm:ss")); | |
call_log_obj.put("Call Duration", "5:00"); | |
add_resp = zoho.crm.create("Calls", call_log_obj); | |
lead_obj.put("Add Call Log", false); | |
update_resp = zoho.crm.updateRecord("Leads", input.lead_id.toString(), lead_obj); | |
info add_resp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment