> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: removeTask(taskId: string) # Method package: wixCrmBackend # Method menu location: wixCrmBackend --> Tasks --> removeTask # Method Link: https://dev.wix.com/docs/velo/apis/wix-crm-backend/tasks/remove-task.md # Method Description: This function will continue to work, but a newer version is available at [wix-crm.v2.Tasks.deleteTask()](https://www.wix.com/velo/reference/wix-crm-v2/tasks/deletetask). > #### 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()`](https://www.wix.com/velo/reference/wix-crm-v2/tasks/deletetask). > > To migrate to the new function: > > 1. Add the new import statement: > > ```javascript > import { tasks } from 'wix-crm.v2' > ``` > > 2. If you plan to migrate all functions that use `wixCrmBackend`, > remove the original `import wixCrmBackend` statement. > > 3. Look for any code that uses `wixCrmBackend.tasks.removeTask()`, > and replace it with with `tasks.deleteTask()`. > Update your code to work with the new `deleteTask()` > call and response properties. > > 4. 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. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Remove a task ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { tasks } from 'wix-crm-backend'; export const removeTask = webMethod(Permissions.Anyone, (taskId) => { return tasks.removeTask(taskId); }); // 3c9683ea-f6cc-470b-b0d1-2eb6b8cea912 - removed task id ``` ---