deleteTask( )


Deletes a task by ID.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Tasks
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
function deleteTask(taskId: string): Promise<void>;
Method Parameters
taskIdstringRequired

ID of the task to delete.

JavaScript
import { tasks } from "wix-crm.v2"; /* Sample taskId value: * '3194f3f2-945f-4810-8905-d02b24f9e790' */ export async function myDeleteTaskFunction(taskId) { try { await tasks.deleteTask(taskId); console.log("Task deleted."); } catch (error) { console.log(error); //Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?