# Update task

### Assign task to user (by username)

Assign a task to given SharePoint user (by username).

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter              | Description                                              |
| ---------------------- | -------------------------------------------------------- |
| Task app name          | Name of Task app in SharePoint (not id)                  |
| Task ID                | ID of task                                               |
| Username               | Username of user to assign task to                       |
| Remove other assignees | Specfies whether to remove other assignees. Default true |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |
| 1000004    | Item with given id does not exist.           |

### Delete task <a href="#delete-task" id="delete-task"></a>

Deletes task with given ID.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter     | Description                             |
| ------------- | --------------------------------------- |
| Task app name | Name of Task app in SharePoint (not id) |
| Task ID       | ID of task                              |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |
| 1000004    | Item with given id does not exist.           |

### Set task as finished <a href="#set-task-as-finished" id="set-task-as-finished"></a>

Sets the percent complete to 100%.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter     | Description                             |
| ------------- | --------------------------------------- |
| Task app name | Name of Task app in SharePoint (not id) |
| Task ID       | ID of task                              |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |
| 1000004    | Item with given id does not exist.           |

### Update task progress <a href="#update-task-progress" id="update-task-progress"></a>

Updates the progress of a given task.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter     | Description                             |
| ------------- | --------------------------------------- |
| Task app name | Name of Task app in SharePoint (not id) |
| Task ID       | ID of task                              |
| New progress  | New progress in %                       |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |
| 1000004    | Item with given id does not exist.           |

### Update task property <a href="#update-task-property" id="update-task-property"></a>

Updates a field of a given task. This is an advanced operation that requires deeper knowledge on how SharePoint works. The Property parameter is the identifier of a field, which might not be the same as is displayed in SharePoint. E.g use 'Body' as Property to update 'Description'.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter     | Description                             |
| ------------- | --------------------------------------- |
| Task app name | Name of Task app in SharePoint (not id) |
| Task ID       | ID of task                              |
| Property      | Name of property                        |
| Value         | New value of property                   |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |
| 1000004    | Item with given id does not exist.           |
