updateCardFields( )
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 card.
The updateCardFields()
function returns a Promise that resolves when the
card has been updated with the specified values.
contactId
is not a required field, but if the parameter is not passed, the field will default to empty and the card will not be associated with any contact.
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 updateCardFields(cardId: string, cardInfo: UpdateCardRequest): Promise<void>
updateCardFields Parameters
NAME
TYPE
DESCRIPTION
ID of the card to update.
Card information to update.
Returns
Fulfilled - When the card has been updated.
Return Type:
Was this helpful?
Update a card
1import { Permissions, webMethod } from 'wix-web-module';2import { workflows } from 'wix-crm-backend';34export const updateCardFields = webMethod(Permissions.Anyone, (cardId, cardInfo) => {5 return workflows.updateCardFields(6 cardId,7 {8 "name": "New Name",9 "contactId": "faad351b-fe07-4541-9157-358eba98b635"10 }11 );12});1314// Returns a promise that resolves to void