Search...
onCardRestored( )
Deprecated. This event will continue to work until June 30, 2024.
Description
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.
Syntax
function onCardRestored(event: CardRestoredEvent): void
onCardRestored Parameters
NAME
TYPE
DESCRIPTION
event
CardRestoredEvent
The restored card's data.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
An event when a card is restored
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.34export function wixCrm_onCardRestored(event) {5 let workflowId = event.workflowId;6 let cardName = event.card.name;7}89/* Full event object:10 * {11 * "workflowId": "f2cb00b5-9286-4d35-b41b-367d6fec43ce",12 * "workflowName": "My Workflow",13 * "phaseId": "ngp4030h-no3q-038h-c390-of40dn28pc9e",14 * "phaseName": "To-do",15 * "card": {16 * "name": "This is a card.",17 * "source": "Contacts",18 * "id": "gd83brj9-34n8-ce8h-fh08-4e90cni3df89",19 * "contactId": "ej8994ed-h3e9-uh2w-fhu0-vj013in3cej8",20 * "createdAt": 2019-03-13T00:00:00.000Z,21 * "updatedAt": 2019-06-12T00:00:00.000Z22 * }23 * }24 */