ftos.businessStatusWorkflow.getStatuses
IMPORTANT!
Starting with v24.3.0, this is renamed from getBusinessStatusesMap to ftos.businessStatusWorkflow.getStatuses.
Starting with v24.3.0, this is renamed from getBusinessStatusesMap to ftos.businessStatusWorkflow.getStatuses.
Returns a mapping of an entity's business statuses configured in its business workflow.
This is a business logic method for business service components.
Syntax
function ftos.businessStatusWorkflow.getStatuses(entityName: string): any
| Parameter | Description |
|---|---|
entityName
|
Name of the entity who's business statuses you wish to map. |
Return Value
Returns a JSON object that contains key – value pairs of the entity's business statuses IDs and business statuses names.
Examples
In this example, we map the business statuses of the Customers entity in an object called statusmappings:
Copy
var statusmappings = ftos.businessStatusWorkflow.getStatuses('Customers');
In this example:
- We store the stringified mappings of the Customers entity's statuses in a variable called message.
- We display the mappings in a notification message. For more details on how to display notification messages, see ftos.context.response.setMessage.
Copy
var message = JSON.stringify(ftos.businessStatusWorkflow.getStatuses('Customers'));
ftos.context.response.setMessage(message, true);