Update Records in Zoho Projects
Table of Contents
Note:
- Each time the zoho.projects.update 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.
- 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 zoho.projects.update integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Description
The zoho.projects.update task updates the specified record with new values in Zoho Projects.
Syntax
<response> = zoho.projects.update(<portal>, <project_id>, <module>, <record_id>, <data_map>, [<connection>]);
where:
| Params | Data type | Description |
| <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:
|
| <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. |
Note:
In integration tasks, the parameters must be in the defined order as given in the syntax, for the Deluge task to be executed. If you choose to use an optional parameter, ensure that all preceding parameters in the syntax are explicitly specified. If a preceding optional parameter is not required, a null value can be assigned instead, to maintain the defined syntax order.
For example, in the below syntax, options_map and connection are optional parameters:
<variable> = zoho.crm.v8.task (<module_name>, <record_details>, <options_map>, <connection>);
If you want to use the connection parameter, module_name, record_details and options_map must be specified in the
exact order as the syntax. You can assign an empty map to the options_map parameter if it is not required.
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"zylker"548XXXXXXXXXXX771"tasks"548XXXXXXXXXXX019values_mapExample 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"zylker"63XXXXXXXXXXX781"bugs"648XXXXXXXXXXX159"NCHAR1"custom_fieldResponse 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"
}
}