Deprecated. This event will continue to work until June 30, 2024.
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.
function onCardMoved(event: CardMovedEvent): void;
The moved card's data.
// Place this code in the events.js file
// of your site's Backend section.
export function wixCrm_onCardMoved(event) {
let workflowId = event.workflowId;
let cardName = event.card.name;
}
/* Full event object:
* {
* "workflowId": "f2cb00b5-9286-4d35-b41b-367d6fec43ce",
* "workflowName": "n89f2df2-2919-43jk-3uio-v90se98s5ipf",
* "newPhaseId": "In Progress",
* "newPhaseName": "sd98iop3-87v3-ni4u-9438-vjc9hu8ec80w",
* "previousPhaseId": "b00831ee-cc5d-4447-81d7-2ca1828f07b2",
* "previousPhaseName": "To-do",
* "card": {
* "name": "This is a card.",
* "id": "gd83brj9-34n8-ce8h-fh08-4e90cni3df89",
* "contactId": "ej8994ed-h3e9-uh2w-fhu0-vj013in3cej8",
* "createdAt": 2019-03-13T00:00:00.000Z,
* "updatedAt": 2019-06-12T00:00:00.000Z
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.