Update records in Zoho People
Table of ContentsUp
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:
Params | Data type | Description |
<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:
|
<connection> | TEXT | The name of the connection and mandatory in Zoho Cliq. Note:
|
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"
param_map
"recordid"
"people_connection"
Response Format
Success Response- The success response will be returned in the following format:
{
"result":"{\"pkId\":\"4163000000170001\",\"message\":\"Successfully Updated\"}"
}
- 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
}
}