Hello team, I have a question, I have created a function to be able to copy information from one field to another. This is invoked as client script, in:
Page Details
Category: module
Page: Detail Page(Standard)
Module: Leads
Layout: Standard
event details
Event Type: Page Event
Event: onLoad
- var id = String($Page.record_id);
- var parameters = '{"id":';
- parameters= parameters.concat(id);
- parameters= parameters.concat('}"');
- var response = ZDK.Apps.CRM.Functions.execute("copy_branch", parameters);
-------------------------------------------------- ----------------------------
Function String copy_branch(string id)
Source code
- resLeads = zoho.crm.getRecordById("Leads",id);
- Branch = resLeads.get("Branch");
- data = Map();
- data.put("Branch_scheduling",Branch);
- result = zoho.crm.updateRecord("Leads",id,data);
- info result;
- return "";
-------------------------------------------------- --------------------------------------
When you load a lead, the client script is triggered, which calls the
copy_branch function, but I get as a response
HTTP Status 400 – Bad Request
What's the wrong?, can you give a hand please?