ftos.businessStatusWorkflow.update
IMPORTANT!
Starting with v24.3.0, this is renamed from changeBusinessStatus to ftos.businessStatusWorkflow.update.
Starting with v24.3.0, this is renamed from changeBusinessStatus to ftos.businessStatusWorkflow.update.
Applies a business status to a record.
This is a business logic method for business service components.
Syntax
function ftos.businessStatusWorkflow.update(entityName: string, recordID: string, statusID: string): void
| Parameter | Description |
|---|---|
entityName
|
The name of the record's parent entity. |
recordID
|
ID of the record whose status is changed. |
statusID
|
ID of the business status you wish to apply to the record. |
Examples
In this example, we update the record with ID e796bdd6-efe6-43e6-b76a-6842d3197735 from the Customers entity to the business status with ID cfad132f-d24b-49b3-a7ac-73d5b6905902.
ftos.businessStatusWorkflow.update('Customers', 'e796bdd6-efe6-43e6-b76a-6842d3197735', 'cfad132f-d24b-49b3-a7ac-73d5b6905902');
In this example:
- We update the record with ID e796bdd6-efe6-43e6-b76a-6842d3197735 from the Customers entity to the VIP business status.
- We are using the ftos.businessStatusWorkflow.getId function to extract the business status ID based on its name.
ftos.businessStatusWorkflow.update('Customers', 'e796bdd6-efe6-43e6-b76a-6842d3197735', ftos.businessStatusWorkflow.getId('Customers', 'VIP'));