Search.../

completeTask( )

Sets a task as completed.

Description

The completeTask() function returns a Promise that resolves to the ID of the the task after it is set as completed.

Syntax

function completeTask(taskId: string): Promise<string>

completeTask Parameters

NAME
TYPE
DESCRIPTION
taskId
string

ID of the task to set as complete.

Returns

Fulfilled - ID of the task to set as complete.

Return Type:

Promise<string>

Was this helpful?

Set a task as completed

Copy Code
1import {tasks} from 'wix-crm-backend';
2
3export function completeTask(taskId) {
4 return tasks.completeTask(taskId);
5}
6
7// Returns a promise that resolves to:
8// "3c9683ea-f6cc-470b-b0d1-2eb6b8cea912"