Choose where you’d like to start

Update records in Zoho People

Overview

The zoho.people.update task is used to update a record in the specified Zoho People form. 

Syntax

<response> = zoho.people.update(<form_name>, <new_values>, [<connection>]);

where:

ParamsData typeDescription

<response> 

KEY-VALUE

The details of the record that will be updated.

<form_name> 

TEXT

The name of the Zoho People form in which the record will be updated with new values.

Note: Click here for the instructions to get the form names in Zoho People.

<new_values>

KEY-VALUE

The new values of the record that needs to be updated. The keys to this param are the label names of the fields in the specified form.

Note:
  • Click here for the instructions to get the field label names.
  • This parameter must mandatorily have the key - recordid and the ID of the record that needs to be updated with new values as its value.

<connection>

TEXT

The name of the connection and mandatory in Zoho Cliq.

Note:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter unless the authtoken is manually deleted from accounts.
  • Add relevant scopes as mentioned in Zoho People API while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

 

Example

The following script updates the record with ID - 41630XXXXX170001 in the form - Employee:

 // Create a variable to hold the new values of the record
 param_map = Map();
 param_map.put("Tags","Technical Support");
 param_map.put("recordid","41630XXXXX170001");
 
 //Execute the Zoho People integration task to update the specified record with new values
 response  = zoho.people.update("P_Employee", param_map, "people_connection");

where:

"P_Employee"
The TEXT that represents the form name.
param_map
The KEY-VALUE variable that holds the new values of the record that needs to be updated.
"recordid"
The TEXT that represents the key that is mapped with the ID of the record that needs to be updated.
"people_connection"
The TEXT that represents the connection name.

Response Format

Success Response
  • The success response will be returned in the following format:

    {  
       "result":"{\"pkId\":\"4163000000170001\",\"message\":\"Successfully Updated\"}"
    }

Failure Response
  • The response for incorrect or non-existent form name will be returned in the following format:

    {  
       "response":"{\"message\":\"Error occurred\",\"uri\":\"/api/forms/json/employ/updateRecord\",\"errors\":{\"code\":7011,\"message\":\"Form name 'employ' is invalid\"},\"status\":1}"
    }

  • The response for incorrect record ID will be returned in the following format:

    {  
       {
       "response": {
       "message": "Error occurred",
       "uri": "/api/forms/json/P_Employee/updateRecord",
       "errors": {
       "code": 7039,
       "message": {
       "Security_Error": "Permission denied to edit record"
       }
       },
       "status": 1
       }
       }

  • The response for missing key - recordID in the <new_values> param will be returned in the following format:

    {  
       "response": {
       "message": "Error occurred",
       "uri": "/api/forms/json/P_Employee/updateRecord",
       "errors": {
       "code": 7204,
       "message": "Wrong datatype for the Parameter Input"
       },
       "status": 1
       }
       }

Related Links

Get Started Now

Execute