Choose where you’d like to start

Change Stage

Note: 
  • 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.

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.

Syntax

thisapp.blueprint.changeStage(<formName>, <blueprintName>, <stageName>, <recordID>);

where:

ParamsData typeDescription

<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 LoadNo
On ValidateNo
On SuccessYes
On User inputNo
Subform on add rowNo
Subform on delete rowNo
When a record is Created or Edited
On LoadNo
On ValidateNo
On SuccessYes
On User inputNo
Subform on add rowNo
Subform on delete rowNo
When a record is Edited
On LoadNo
On ValidateNo
On SuccessYes
On User inputNo
Subform on add rowNo
Subform on delete rowNo
When a record is Deleted
On ValidateNo
On SuccessYes
Other workflow events
On a scheduled dateYes
During approval processYes
During payment processYes
In a Custom FunctionYes
In an Action item in reportYes

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"
is the TEXT that represents the name of the form associated with the blueprint.
"orders"
is the TEXT that represents the name of the blueprint.
"cancelled"
is the TEXT that represents the stage name that be switched.
ID
is the NUMBER that represents the ID of the record in which this task will be executed.
 

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);

Related Links

Get Started Now

Execute