Update Record
Table of Contents
Note:
Each time the Update Record integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
The API limits deduction depend on where the request is sent and received.
When this task is executed to send request,within the same Zoho Creator account - Both the Developer API limit and the External calls limit are deducted from that Creator account.
from a different service to a Zoho Creator account - The Developer API limit is deducted from the target Creator account, and the external calls limit is deducted from the service that sends the request.
from one Zoho Creator account to another Zoho Creator account - The Developer API limit is deducted from the target Creator account, and the External calls limit is deducted from the Creator account that sends the request.
Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if the Update Record task is placed inside a for each task that iterates five times, five external API calls will be consumed, even though the task appears only once in the script.
Overview
The zoho.creator.updateRecord task is used to update a record using its ID in the specified Zoho Creator application.
Syntax
<variable> = zoho.creator.updateRecord(<owner_name>, <app_link_name>, <report_link_name>, <record_id>, <new_input_values>, <other_api_params>, <connection_link_name>);
where:
| Parameter | Data Type | Description |
| <variable> | KEY-VALUE | Variable that will hold the details of the updated record. |
| <owner_name> | TEXT | Name of the owner of the app from which the record needs to be fetched. Note: Name of the application owner can be fetched in the following ways:
|
| <app_link_name> | TEXT | Link name of the application in which a record needs to be updated. Note: Link name of the application can be fetched in the following ways:
|
| <report_link_name> | TEXT | Link name of the report in which the record needs to be updated is available. Note:
|
<record_id> | NUMBER | ID of the record that needs to be updated. Note: You can use the zoho.creator.getRecords integration task to fetch the record ID. Click here for the Deluge script to extract record IDs from the returned response. |
| <new_input_values> | KEY-VALUE | Supply input field values as a KEY-VALUE collection. The keys to this parameter are the field link names and the values are their corresponding input values. Note:
|
| <other_api_params> | KEY-VALUE | Other optional parameters specified in Zoho Creator Update Record By ID API document. Note: To skip this parameter, provide an empty map as its value. |
| <connection_link_name> | TEXT | Link name of the connection created and connected to your Zoho Creator account. Note:
|
Example
The following example updates the record with ID - 60210000000020007 from the report - All_tasks of the Zoho Creator application - Task_Management with the specified values.
// Create a KEY-VALUE variable to hold the new record values dataMap = Map(); dataMap.put("Task_Name", "Priority Task"); // Create an empty KEY-VALUE variable to skip optional parameters otherParams = Map(); // Write update record integration task response = zoho.creator.updateRecord("Shawn","Task_Management","All_Tasks",60210000000020007, dataMap, otherParams, "creator_oauth_connection");
where:
response"Shawn""Task_Management""All_Tasks"60210000000020007dataMapotherParamsResponse Format
Success Response
The successful response will be returned in the following format:
{
"code":3000,
"data":{
"ID":"60210000000020007",
}
}
Failure Response
The failure response for incorrect or non-existent application name will be returned in the following format
{
"code": 2892,
"message": "No application named <application_name> found. Please check and try again."
}The failure response for incorrect owner name will be returned in the following format
{
"code": 1110,
"message": "No workspace named <owner_name> found. Please enter a valid workspace value."
}The failure response for incorrect or non-existent report name will be returned in the following format
{
"code": 2894,
"message": "No report named <report_link_name> found. Please check and try again."
}The failure response for incorrect or non-existent record ID will be returned in the following format:
{
"code": 3100,
"message": "No Data Available"
}