Change Stage
Table of Contents
Note:
- This task is only applicable to Zoho Creator.
Overview
The thisapp.blueprint.changeStage task lets you change the blueprint stage of a record to a specified stage without performing any transitions in-between.
Note:
- This task cannot be performed, if the blueprint is not active in that specified record.
- The maximum number of blueprint statements that can be executed in one function is 50.
- Blueprint will be associated only after the event completes for records created using the insert record task. To execute a change stage, you can use make use of schedule workflows.
Syntax
thisapp.blueprint.changeStage(<form_link_name>, <blueprint_link_name>, <stage_link_name>, <recordID>);
where:
Params | Data type | Description |
---|---|---|
<form_link_name> | TEXT | The link name of the form associated with the blueprint. Note:
|
<blueprint_link_name> | TEXT | The link name of the blueprint in which this task will be performed. Note: You can get the link name of blueprint under Blueprint properties. |
<stage_link_name> | TEXT | The link name of the stage to which the transition needs to be made. (The stage link name is the same as stage name) |
<recordID> | NUMBER | The ID of the record in which this task will be performed. |
This task can be used in the following events
When a record is Created | ||
On Load | No | |
On Validate | No | |
On Success | Yes | |
On User input | No | |
Subform on add row | No | |
Subform on delete row | No | |
When a record is Created or Edited | ||
On Load | No | |
On Validate | No | |
On Success | Yes | |
On User input | No | |
Subform on add row | No | |
Subform on delete row | No | |
When a record is Edited | ||
On Load | No | |
On Validate | No | |
On Success | Yes | |
On User input | No | |
Subform on add row | No | |
Subform on delete row | No | |
When a record is Deleted | ||
On Validate | No | |
On Success | Yes | |
Other workflow events | ||
On a scheduled date | Yes | |
During approval process | Yes | |
During payment process | Yes | |
In a Custom Function | Yes | |
In an Action item in report | Yes |
Example 1: Change the stage of the blueprint
The following example changes the stage of the blueprint from the ordered stage to the cancelled stage in an order management form.
thisapp.blueprint.changeStage("orderMangement", "orders", "cancelled", input.ID);
Where:
"orderManagement"
"orders"
"cancelled"
ID
Scenario 1
In a courier delivery management system, a package undergoes several processes before delivering to the customer, including packing, shipping, and despatching. These processes will be added as blueprint stages. In some situations, if a customer collects the couriers directly from the delivery office when the package reaches the destination city, the stage Out for delivery should be skipped to delivered by configuring the workflow as a button in the report with this task.
note = "directly picked up at hub by customer"; thisapp.blueprint.changeStage("courierMangement", "deliveryStatus", "delivered", input.ID);