onCardRestored( )


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

An event that triggers when a workflow card is moved.

The onCardRestored() event handler runs when a workflow card is restored programmatically using the restoreCard() function or manually in your site's Dashboard. The received CardRestoredEvent object contains information about the card that was restored.

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

Method Declaration
Copy
function onCardRestored(event: CardRestoredEvent): void;
Method Parameters
eventCardRestoredEventRequired

The restored card's data.

An event when a card is restored
JavaScript
// Place this code in the events.js file // of your site's Backend section. export function wixCrm_onCardRestored(event) { let workflowId = event.workflowId; let cardName = event.card.name; } /* Full event object: * { * "workflowId": "f2cb00b5-9286-4d35-b41b-367d6fec43ce", * "workflowName": "My Workflow", * "phaseId": "ngp4030h-no3q-038h-c390-of40dn28pc9e", * "phaseName": "To-do", * "card": { * "name": "This is a card.", * "source": "Contacts", * "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 * } * } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?