restoreCard( )
Deprecated. This function is being discontinued in the upcoming months. We are working to provide alternatives, and we'll provide timely updates before implementing any changes. We understand that this transition might present challenges, and we appreciate your patience and understanding.
Description
Restores an archived workflow card.
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.
Note: Each workflow is limited to 5,000 cards. If this limit is reached,
createCard()
throws an error. Archive cards when they're no longer needed to reduce card count and avoid hitting the limit.
Syntax
function restoreCard(cardId: string, options: MoveCardOptions): Promise<void>
restoreCard Parameters
NAME
TYPE
DESCRIPTION
ID of the card to restore.
Information about where to restore the card to.
Returns
Fulfilled - When the card has been restored.
Return Type:
Was this helpful?
Restore a card
1import { Permissions, webMethod } from 'wix-web-module';2import { workflows } from 'wix-crm-backend';34export const restoreCard = webMethod(Permissions.Anyone, async (cardId, phaseId) => {5 return await workflows.restoreCard(6 cardId,7 {8 "newPhaseId": phaseId,9 "newPosition": 010 }11 );12});1314// Returns a promise that resolves to void.