Search.../

moveCard( )

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

Moves a card to a new position within a workflow.

The moveCard() function returns a Promise when the specified card has been moved to the new position.

Use the options parameter to specify the phase and position within that phase to move the card to. Positions are zero-based, meaning the first position is 0.

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 moveCard(cardId: string, options: MoveCardOptions): Promise<void>

moveCard Parameters

NAME
TYPE
DESCRIPTION
cardId
string

ID of the card to move.

options
MoveCardOptions

Information about where to move the card.

Returns

Fulfilled - When the card has moved.

Return Type:

Promise<void>

Was this helpful?

Move a card

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { workflows } from 'wix-crm-backend';
3
4export const moveCard = webMethod(Permissions.Anyone, async (cardId, options) => {
5 return await workflows.moveCard(
6 cardId,
7 {
8 "newPosition": 0
9 }
10 );
11});
12
13// Returns a promise that resolves to void.