An event that triggers when a task is deleted.
The onTaskDeleted()
event handler runs when a task is deleted. The received TaskDeleted
object contains metadata.
Note: Backend events don't work when previewing your site.
function wixCrmTasks_onTaskDeleted(event: TaskDeleted): void;
Metadata for the event.
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixCrmTasks_onTaskDeleted(event) {
const eventId = event.metadata.entityId;
console.log("Task deleted", event);
}
/* Full event object:
* {
* "metadata": {
* "id": "9f6cc944-3204-46aa-a81f-4200159e8777",
* "entityId": "c68244a0-e68f-49ca-b38c-43a0323b47ca",
* "eventTime": "2024-01-21T06:53:43.861432102Z",
* "triggeredByAnonymizeRequest": false
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.