Bad request 404 / ZDK.Apps.CRM.Functions.execute

Bad request 404 / ZDK.Apps.CRM.Functions.execute

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


  1. var id = String($Page.record_id);
  2. var parameters = '{"id":';
  3. parameters= parameters.concat(id);
  4. parameters= parameters.concat('}"');


  5.   var response = ZDK.Apps.CRM.Functions.execute("copy_branch", parameters);
-------------------------------------------------- ----------------------------
Function String copy_branch(string id)

Source code

  1. resLeads = zoho.crm.getRecordById("Leads",id);
  2. Branch = resLeads.get("Branch");
  3. data = Map();
  4. data.put("Branch_scheduling",Branch);
  5. result = zoho.crm.updateRecord("Leads",id,data);
  6. info result;
  7. 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?