Search.../

onCardMoved( )

Deprecated. This event will continue to work until June 30, 2024.

Description

An event that triggers when a workflow card is moved.

The onCardMoved() event handler runs when a workflow card is moved programmatically using the moveCard() function or manually in your site's Dashboard. The received CardMovedEvent object contains information about the card that was moved.

Note: Backend events don't work when previewing your site.

Syntax

function onCardMoved(event: CardMovedEvent): void

onCardMoved Parameters

NAME
TYPE
DESCRIPTION
event
CardMovedEvent

The moved card's data.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

An event when a card is moved

Copy Code
1// Place this code in the events.js file
2// of your site's Backend section.
3
4export function wixCrm_onCardMoved(event) {
5 let workflowId = event.workflowId;
6 let cardName = event.card.name;
7}
8
9/* Full event object:
10 * {
11 * "workflowId": "f2cb00b5-9286-4d35-b41b-367d6fec43ce",
12 * "workflowName": "n89f2df2-2919-43jk-3uio-v90se98s5ipf",
13 * "newPhaseId": "In Progress",
14 * "newPhaseName": "sd98iop3-87v3-ni4u-9438-vjc9hu8ec80w",
15 * "previousPhaseId": "b00831ee-cc5d-4447-81d7-2ca1828f07b2",
16 * "previousPhaseName": "To-do",
17 * "card": {
18 * "name": "This is a card.",
19 * "id": "gd83brj9-34n8-ce8h-fh08-4e90cni3df89",
20 * "contactId": "ej8994ed-h3e9-uh2w-fhu0-vj013in3cej8",
21 * "createdAt": 2019-03-13T00:00:00.000Z,
22 * "updatedAt": 2019-06-12T00:00:00.000Z
23 * }
24 * }
25 */