Choose where you’d like to start

Execute Transition

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.executeTransition task lets you perform any succeeding transition in a blueprint stage.

Note: 
  • This task cannot be executed if the transitions have already been executed manually from the report.
  • If the condition criteria is set for the transition, that needs to be fulfilled to perform this task.
  • When you perform this task, the stage will be changed to the succeeding stage of the executed transition.
  • The maximum number of blueprint statements that can be executed in one function is 50.

Syntax

thisapp.blueprint.executeTransition(<formName>, <blueprintName>, <transitionName>, <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.

<transitionName>

TEXT

 The name of the transition in the blueprint that to be executed. 

<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: To perform the transition

The following example executes the delivery transition of the blueprint order management form.

thisapp.blueprint.executeTransition("orderManagement", "orderFlow", "delivered", input.ID);

Where:

"orderManagement"
is the TEXT that represents the name of the form associated with the blueprint.
"orderFlow"
is the TEXT that represents the name of the blueprint.
"delivered"
is the TEXT that represents the transition name that needs to be executed.
ID
is the NUMBER that represents the ID of the record on which this task to be performed
 

Scenario 1

Let's look at an online skill training management application, with the Registration form for trainee registration and the Institution details form for collecting institution details. The Institution details form is linked to the Registration form, with institution name as a lookup. The registration form is associated in the blueprint with stages and transitions, as shown below.

Consider a scenario where 20 students from the same institution applied for robotics and automation training. All of these students will undergo the training during the same time period, so the process of registration and fee payment will be the same for all and the institution will register and pay their fee. Instead of executing the Registered and fee paid transition in the blueprint individually for all these students, we can execute these transitions for all students of this institution at once by configuring a workflow with the thisapp.blueprint.executeTransition task as a action in the Institution details form's report. When you click this action item from the record of the desired institution in report, the transitions Registered and fee paid in the blueprint will be executed for all students of the institution in Registration form's report.

//fetch records of the students based on institution 
Records = Registration [ID == input.ID]; 
//execute transition for fetched records. 
for each data in Records 
{ 
thisapp.blueprint.executeTransition("Registration", "Training", "Registered and fee paid", data.ID); 
}

Related Links

Get Started Now

Execute