Choose where you’d like to start

Update Records in Zoho Projects

Description

The zoho.projects.update task updates the specified record with new values in Zoho Projects.

Note: For security reasons, if you execute Zoho Projects integration tasks for more than 100 times under 2 minutes, you will be restricted to execute any Zoho Projects integration task for the next 30 mins.

Syntax

<response> = zoho.projects.update(<portal>, <project_id>, <module>, <record_id>, <data_map>, [<connection>]);

where:

ParamsData typeDescription

<response> 

KEY-VALUE

The details of the records that will be updated in the specified Zoho Projects module.

<portal> 

TEXT/ NUMBER

The name or ID of the portal.

Note: You can get the name or ID of the portal using the get portals task. Click here to learn more about it.

<project_id> 

NUMBER

The ID of the project.

Note: You can get project_id using the get project details task. Click here to learn more about it.

<module> 

TEXT

The name of the module in which the record will be updated.

Allowed values:

  • milestones
  • taskLists
  • tasks
  • bugs
  • logs

<record_id> 

NUMBER

The ID of the record that needs to be updated.

Note: You can get record_id using the get records task. Click here to learn more about it.

<data_map>

KEY-VALUE

The parameters, as specified in the Zoho Projects API. The API documents for all the allowed modules are listed below:

<connection>

(optional)

TEXT

The link name of the connection.

Note: This parameter is applicable to all Zoho services that have connections support, except Zoho Creator.

Example 1: Update priority field in the tasks module

The following script updates the specified record with new values in Zoho Projects:

 values_map = Map();
 values_map.put("priority", "High");
 response = zoho.projects.update("zylker", 548XXXXXXXXXXX771, "tasks", 548XXXXXXXXXXX019, values_map);

where:

response
The KEY-VALUE response returned by Zoho Projects. It represents the details of the task that will be updated.
"zylker"
The TEXT that represents the name of the portal.
548XXXXXXXXXXX771
The NUMBER that represents the ID of the project.
"tasks"
The TEXT that represents the name of the module in which the record will be updated.
548XXXXXXXXXXX019
The NUMBER that represents the ID of the record that needs to be updated.
values_map
The KEY-VALUE variable that holds the new values.

Example 2: Update a custom field in the bugs module

The following script updates a custom field in the specified record with new values in Zoho Projects:

 custom_field = Map();
 custom_field.put("NCHAR1","Software development");

 response = zoho.projects.update("zylker", 63XXXXXXXXXXXX781, "bugs", 648XXXXXXXXXXX159, custom_field);

where:

response
The KEY-VALUE response returned by Zoho Projects. It represents the details of the bugs that will be updated.
"zylker"
The TEXT that represents the name of the portal.
63XXXXXXXXXXX781
The NUMBER that represents the ID of the project.
"bugs"
The TEXT that represents the name of the module in which the record will be updated.
648XXXXXXXXXXX159
The NUMBER that represents the ID of the record that needs to be updated.
"NCHAR1"
The TEXT key that represents the column name of the custom field. You can get the unique column name of the required custom field using this Zoho Projects API. Refer invoke URL to learn how to make API calls using Deluge.
custom_field
The KEY-VALUE variable that holds the new values of the custom field.

Response Format

Success Response

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

      {
      "fieldsNotPermitted": "",
      "tasks": [
      {
      "milestone_id": "548XXXXXXXXXXX092",
      "link": {
      "timesheet": {
      "url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX771/tasks/548XXXXXXXXXXX019/logs/"
      },
      "self": {
      "url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX771/tasks/548XXXXXXXXXXX019/"
      }
      },
      "is_comment_added": false,
      "duration": "0",
      "last_updated_time_long": 1566303491257,
      "is_forum_associated": false,
      "details": {
      "owners": [
      {
      "name": "Unassigned"
      }
      ]
      },
      "id": 548XXXXXXXXXXX019,
      "key": "OR1-T7",
      "created_person": "Shawn",
      "created_time_long": 1566298139609,
      "created_time": "08-20-2019",
      "is_reminder_set": false,
      "is_recurrence_set": false,
      "created_time_format": "08-20-2019 04:18:59 PM",
      "subtasks": false,
      "work": "0:00",
      "isparent": false,
      "duration_type": "days",
      "work_type": "work_hrs_per_day",
      "task_followers": {
      "FOLUSERS": "",
      "FOLLOWERSIZE": -1,
      "FOLLOWERS": [
      ]
      },
      "completed": false,
      "priority": "High",
      "created_by": "58131170",
      "percent_complete": "0",
      "last_updated_time": "08-20-2019",
      "name": "Draft Documents",
      "id_string": "548XXXXXXXXXXX019",
      "last_updated_time_format": "08-20-2019 05:48:11 PM",
      "tasklist": {
      "name": "General",
      "id": "548XXXXXXXXXXX003"
      },
      "order_sequence": 3,
      "status": {
      "name": "Open",
      "id": "548XXXXXXXXXXX001",
      "type": "open",
      "color_code": ""
      }
      }
      ]
      }

Failure Response

  • The failure response for invalid project ID or record ID will be returned in the following format:

      {
      "error": {
      "code": 6404,
      "message": "Resource Not Found"
      }
      }
  • The failure response for invalid portal name will be returned in the following format:

      {
      "error": {
      "code": 6504,
      "message": "Domain Not Available"
      }
      }
  • The failure response for invalid portal ID will be returned in the following format:

      {
      "error": {
      "code": 6500,
      "message": "General Error"
      }
      }

Related Links

Get Started Now

Execute