removeTask( )
This function will continue to work, but a newer version is available at wix-crm.v2.Tasks.deleteTask().
Description
Migration Instructions
If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to
wix-crm.v2.Tasks.deleteTask()
.To migrate to the new function:
Add the new import statement:
javascript | Copy Codeimport { tasks } from 'wix-crm.v2'If you plan to migrate all functions that use
wixCrmBackend
, remove the originalimport wixCrmBackend
statement.Look for any code that uses
wixCrmBackend.tasks.removeTask()
, and replace it with withtasks.deleteTask()
. Update your code to work with the newdeleteTask()
call and response properties.Test your changes to make sure your code behaves as expected.
Removes an existing task.
The removeTask()
function returns a Promise that resolves to the ID of the
the removed task after it has been successfully removed.
Syntax
function removeTask(taskId: string): Promise<string>
removeTask Parameters
NAME
TYPE
DESCRIPTION
ID of the task to remove.
Returns
Fulfilled - ID of the removed task.
Return Type:
Was this helpful?
Remove a task
1import { Permissions, webMethod } from 'wix-web-module';2import { tasks } from 'wix-crm-backend';34export const removeTask = webMethod(Permissions.Anyone, (taskId) => {5 return tasks.removeTask(taskId);6});78// 3c9683ea-f6cc-470b-b0d1-2eb6b8cea912 - removed task id