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.
Retrieves a workflow card by ID.
The getCard()
function returns a Promise that resolves to the card
with the specified ID.
This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflow API, see Retrieving IDs.
function getCard(cardId: string): Promise<Card>;
ID of the card to retrieve.
import { Permissions, webMethod } from "wix-web-module";
import { workflows } from "wix-crm-backend";
export const getCard = webMethod(Permissions.Anyone, (cardId) => {
return workflows.getCard(cardId);
});
// Returns a promise that resolves to
// {
// "name": "Card Name",
// "id": "63c83c38-f504-4eb8-a48c-1d77c436a678",
// "contactId": "95bc7a80-5500-4445-9c90-adc0ff1b25ac",
// "phaseId": "15bc7a80-5500-4445-9c90-adc0ff1b25ac",
// "createdDate": "2019-05-05T12:23:43Z",
// "updatedDate": "2019-05-05T12:23:43Z",
// "source": "Inbox"
// }
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.