> 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: onTaskCreated(event: TaskCreated) # Method package: wixCrmV2 # Method menu location: wixCrmV2 --> onTaskCreated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/crm/events/on-task-created.md # Method Description: An event that triggers when a new task is created. The `onTaskCreated()` event handler runs when a new task is created. The received `TaskCreated` object contains information about the task that was created. >**Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event fired when a task is created ```javascript // 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_onTaskCreated(event) { const eventId = event.metadata.id; const entityId = event.entity._id; const title = event.entity.title; console.log('Task created', event); } /* Full event object: * { * "metadata": { * "id": "bd6c5959-5e88-4509-b7c3-fd17b41840eb", * "entityId": "941ddd7a-5c3c-4bec-923e-fd6747f23e3f", * "eventTime": "2024-01-21T06:52:40.743280247Z", * "triggeredByAnonymizeRequest": false * }, * "entity": { * "revision": "1", * "title": "Send follow up email", * "dueDate": "2024-01-31T10:00:00.000Z", * "status": "ACTION_NEEDED", * "source": { * "sourceType": "USER", * "userId": "162e6672-d392-42f8-bf79-999ee633c92a" * }, * "_id": "941ddd7a-5c3c-4bec-923e-fd6747f23e3f", * "_createdDate": "2024-01-21T06:52:40.738Z", * "_updatedDate": "2024-01-21T06:52:40.738Z" * } * } */ ``` ---