Search.../

restoreCard( )

Restores an archived workflow card.

Description

The restoreCard() function returns a Promise that resolves when the archived card has been restored.

This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflow API, see Retrieving IDs.

Syntax

function restoreCard(cardId: string, options: MoveCardOptions): void

restoreCard Parameters

NAME
TYPE
DESCRIPTION
cardId

string

ID of the card to restore.

options

MoveCardOptions

Information about where to restore the card to.

Returns

Fulfilled - When the card has been restored.

Return Type:

Promise<void>

Was this helpful?

Restore a card

Code Example

Copy Code
1import {workflows} from 'wix-crm-backend';
2
3export async function restoreCard(cardId, phaseId){
4 return await workflows.restoreCard(
5 cardId,
6 {
7 "newPhaseId": phaseId,
8 "newPosition": 0
9 }
10 );
11}
12
13// Returns a promise that resolves to void.