Update records in Zoho Creator v2.1

Note: This task is applicable to all services except Zoho Creator.

Overview

The zoho.creator.v2_1.updateRecords task updates all records in a specified Zoho Creator report that match the given criteria with the provided input field values.

Note: This integration task is based on the Zoho Creator - Update Records API.

Syntax

<response> = zoho.creator.v2_1.updateRecords(<owner_name>, <app_link_name>, <report_link_name>, <criteria>, <input_values>, <configuration>, <connection_link_name>);

where:

ParameterData TypeDescription
<response>KEY-VALUEThe response returned by Zoho Creator containing details of the updated records.
<owner_name>TEXT

Specifies the owner of the Zoho Creator application in which the records will be updated.

Note: Name of the application owner can be fetched in the following ways:

  • URL of the application while editing or accessing it. The URL is in the format: creator.zoho.com/appbuilder/<application_owner>/...
  • Using the system variable - zoho.adminuser
<app_link_name>TEXT

Link name of the application in which the records will be updated.

Note: Link name of the application can be fetched in the following ways:

  • URL of the application while editing or accessing it. The URL is in the format: app.zohocreator.com/appbuilder/<application_owner>/<application_name>/...
  • Using the system variable - zoho.appname
<report_link_name>TEXT

Link name of the report that contains the records to be updated.

Note: You can fetch link names from the URL while accessing the report. The URL is in the format: app.zohocreator.com/appbuilder/<application_owner>/<application_name>/#Report:<report_link_name>

<criteria>TEXT

Specifies the condition that records must satisfy to be updated.

Note: To update all records, specify the criteria as ID!=0 or ID!=null.
If your criteria contains a string constant, enclose it in escaped double quotes. For example, "Task_Name==Service Task" should be provided as "Task_Name==\"Service Task\"".

<input_values>KEY-VALUE

Provides the new field values as a KEY-VALUE collection, where each key represents a field’s link name and each value represents the updated data.

Note: Refer to the Zoho Creator Update Record By ID API document for the rules and validations that your input data need to satisfy.

<other_api_params>KEY-VALUE

Specifies optional configuration parameters supported by the Update Records API, such as environment, message customization, and workflow control.

Note: To skip this parameter, provide an empty map as its value. Example: configuration = Map();

<connection_link_name>TEXT

Link name of the connection created and connected to your Zoho Creator account.

Note:

  • Add relevant scopes as mentioned in Zoho Creator Add Records API document while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.

Optional parameters for <configuration>)

The following keys can be included within the parameter in the updateRecords task. These options control the environment, workflow behavior, redirection, and response details.

ValueData typeDescription
environmentTEXT

Specifies the environment where the record should be created. Accepted values: "development" or "stage". 
This parameter is not required for production environment.

Note: The value here is case sensitive and should be used as such.

tasksBOOLEAN

When this key is included in the configuration with the value true, the response will include details of the form, report, page, or URL to which the target form is configured to redirect after a successful submission.
Redirection can be configured using the direct to form property or a workflow redirection action. The response will include the following keys:

  • "type" key - contains the type of window in which the target URL should open. Possible values: same window, new window, or parent window.
  • "url" key - contains the destination of the redirect, for example:
    • #Form:
    • #Report:
    • #Page:
messageBOOLEANWhen the value is true, the response will contain "message":"Data Added Successfully" or the message that's configured for the target form's show message property, or the message that's configured as part of a show message workflow action.
When the value is false or does not include this message key, the response will contain "message":"Data Added Successfully"
skip_workflowLIST

Prevents the associated workflows from being executed on the creation of a record. You can choose to skip form workflows and/or schedules. When more than one type of workflow is mentioned, the parameter values should be supplied as "comma" separated values in a list.

Possible values: form_workflow, schedules, all

Note: If this parameter is not supplied by default, all associated workflows will be triggered.
Blueprints and approvals will be triggered on the creation of records and cannot be skipped.

Example

A company uses a Zoho Creator app named Task Management to manage tasks raised by its customers. Periodically, the support team reviews all tasks marked as Priority in the type field and updates their details for better tracking.

// Create a KEY-VALUE variable to hold the input record values
data_map = Map();
data_map.put("Task_Name", "Priority Task");
// Create an empty KEY-VALUE variable or null to skip the other_params parameter optional_params = Map(); workflows = List(); workflows.add("form_workflow"); workflows.add("schedules"); optional_params.put("environment", "stage"); optional_params.put("tasks", true); optional_params.put("skip_workflow", workflows); optional_params.put("message", true);
response = zoho.creator.v2_1.updateRecords("Shawn","Task_Management","All_Tasks","(type.contains("Priority"))",data_map,optional_params,"creator_oauth_connection");

Response Format

Success Response

  • The success response will be returned in the following format:
{ "result": [ { "code": 3000, "data": { "Number": "12345", "Single_Line": "Single Line of Text", "ID": "3888833000000114023" }, "message": "Data Updated Successfully!", "tasks": { "openurl": { "type": "Same window", "url": "http://www.zylker.com " } } }, { "code": 3000, "data": { "Number": "12345", "Single_Line": "Single Line of Text", "ID": "3888833000000114047" }, "message": "Data Updated Successfully!", "tasks": { "openurl": { "type": "Same window", "url": "http://www.zylker.com " } } }, { "code": 3000, "data": { "Number": "12345", "Single_Line": "Single Line of Text", "ID": "3888833000000118019" }, "message": "Data Updated Successfully!", "tasks": { "openurl": { "type": "Same window", "url": "http://www.zylker.com " } } } ], "code": 3000 }

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 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 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 found. Please check and try again." }

Things to Know

This task is subject to the general API limits and data validation rules:

  • You can update up to 200 records per request.
  • A maximum of 50 requests per minute is allowed per IP address.
  • Field-level restrictions apply (for example, you cannot set values for system fields such as Auto Number, Formula, File Upload, Signature, etc.).
  • All form validation rules, mandatory fields, and data type constraints still apply when records are created via the API.

For a full list of limits and supported field types, refer to Zoho Creator API v2.1

Related Links