Search.../

updatePhaseFields( )

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

Updates an existing workflow phase.

The updatePhaseFields() function returns a Promise that resolves when the phase has been updated with the specified values.

Only the properties passed in the Phase object will be updated. All other properties will remain the same.

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

Syntax

function updatePhaseFields(phaseId: string, phaseInfo: UpdatePhaseRequest): Promise<void>

updatePhaseFields Parameters

NAME
TYPE
DESCRIPTION
phaseId
string

ID of the phase to update.

phaseInfo
UpdatePhaseRequest

Phase information to update.

Returns

Fulfilled - When the phase has been updated.

Return Type:

Promise<void>

Was this helpful?

Update a phase

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { workflows } from 'wix-crm-backend';
3
4export const updatePhaseFields = webMethod(Permissions.Anyone, (phaseId, phaseInfo) => {
5 return workflows.updatePhaseFields(
6 phaseId,
7 {
8 "name": "New Name"
9 }
10 );
11});
12
13// Returns a promise that resolves to void.