Update Associated Logs in Zoho Projects
Table of Contents
Description
The zoho.projects.updateAssociateLogs task updates the time log associated with the specified record in Zoho Projects.
Syntax
<response> = zoho.projects.updateAssociateLogs(<portal>, <project_id>, <log_record_id>, <module>, <record_id>, <values>, [<connection>]);
where:
Params | Data type | Description |
<response> | KEY-VALUE | The details of the time logs that will be updated and the status of the executed task. |
<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. |
<log_record_id> | NUMBER | The record ID of the time log that needs to be updated. Note: You can get the ID of the record using the get records task. Click here to learn more about it. |
<module> | TEXT | The name of the module in which the time log will be updated. Allowed values:
|
<record_id> | NUMBER | The ID of the record to which the time log is associated. Note: You can get the ID of the record using the get records task. Click here to learn more about it. |
<values> | KEY-VALUE | The values of the new time log that needs to be created. The keys to this parameter are provided 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
The following example creates a time log with the specified values and associates it with the task of ID - 548XXXXXXXXXXX885:
new_value = Map(); new_value.put("date", "07-11-2019"); new_value.put("bill_status", "Non Billable"); new_value.put("hours", "01:15"); response = zoho.projects.updateAssociateLogs("zylker", 548XXXXXXXXXXX771, 548XXXXXXXXXXX001, "tasks", 548XXXXXXXXXXX885, new_value);
where:
response
"zylker"
548XXXXXXXXXXX771
548XXXXXXXXXXX001
"tasks"
548XXXXXXXXXXX885
new_value
Response Format
Success Response
The success response will be returned in the following format:
{
"timelogs": {
"tasklogs": [
{
"created_time_long": 1566220176747,
"hours": 1,
"notes": "",
"owner_name": "Shawn",
"created_time_format": "08-19-2019 06:39:36 PM",
"minutes": 15,
"total_minutes": 75,
"owner_id": "58131170",
"approval_status": "Approved",
"link": {
"self": {
"url": "https://projects.zoho.com/restapi/portal/test24/projects/548XXXXXXXXXXX771/tasks/548XXXXXXXXXXX885/logs/548XXXXXXXXXXX001/"
}
},
"last_modified_date": "08-20-2019",
"log_date_long": 1562869799000,
"bill_status": "Non Billable",
"last_modified_time_long": 1566286952823,
"last_modified_time_format": "08-20-2019 01:12:32 PM",
"task": {
"name": "task 1",
"id_string": "548XXXXXXXXXXX885",
"id": 548XXXXXXXXXXX885
},
"log_date": "07-11-2019",
"id_string": "548XXXXXXXXXXX001",
"id": 548XXXXXXXXXXX001,
"created_date": "08-19-2019",
"log_date_format": "07-11-2019 11:59:59 PM",
"hours_display": "01:15"
}
]
}
}
Failure Response
The failure response for invalid Project ID or log 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"
}
}