Update Records in Zoho CRM

 Update a record in CRM Module

You can update a record in Zoho CRM using the updateRecord() Deluge task.


<map-variable> = zoho.crm.updateRecord(<CRM Module Name>, <ID> , <New values as map object>);

<map-variable> is the xml string returned by CRM.
<CRM Module Name> is the name of the CRM module where the record will be updated. Forexample, "Leads" refers to the Leads module.
<ID> is the ID of the CRM record to be updated
<map variable> is the map variable that holds the key,value pairs. The map key is the label name as specified in the CRM module and the map value is the field value as submitted in the ZC form. For example, "Company" : input.Company_Name . Here, "Company" is the label name of the crm module and input.Company_Name refers to the value specified in the Company_Name field in the Zoho Creator form.

 Example Code

resp = zoho.crm.updateRecord("Leads","11234000002",{"Phone":2943885,"Department":"Admin","Task Owner" : input.Owner_Name, "SMOWNERID" : input.Owner_ID});

 Using Script Builder

You can define the updaterecord() task using Script Builder by following the steps given below:

  1. Drag and drag the Call function to the builder area and select Integration Tasks.
  2. Select the Service as Zoho CRM and the function as updaterecord.
  3. Select the required CRM Module to which the record will be updated.
  4. Specify the ID of the CRM record to be updated
  5. The New values as map object will list the map variable that holds the key value pairs, if already defined.Click on New Map link to specify the key, value pairs, as shown in the screen-shot below.
  6. Specify the CRM Response Variable and click Done to add the task to the script builder.
  7. Click Save Script to add the script.

 Updating a task with Contact and Account Lookup

crmResp = zoho.crm.updateRecord("Tasks", input.task_ID, { "Status" : "In Progress","Task Owner" : input.Owner_Name, "SMOWNERID" : input.Owner_ID, "SEMODULE" : "Accounts", "SEID" : input.Account_ID, "CONTACTID" : input.Contact_ID});

 Related Links