Change Stage
Table of Contents
- This task is only applicable to Zoho Creator.
- This task applies only to users who signed up after 08/02/23. It will be rolled out in phases for existing users.
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.
- 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.
Syntax
thisapp.blueprint.changeStage(<formName>, <blueprintName>, <stageName>, <recordID>);
where:
Params | Data type | Description |
<formName> | TEXT | The name of the form associated with the blueprint. |
<blueprintName> | TEXT | The name of the blueprint in which this task will be performed. |
<stageName> | TEXT | The stage name of the blueprint that to be switched from the current stage. |
<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);