Create a UI action
Create a UI action to display a button on a change request for the Complete state.
Before you begin
Role required: admin
About this task
The UI action must contain a condition that uses the state model script include to decide when the Complete button is displayed on the Change Request form. In this case, the Complete button is displayed only when the change has reached the Implement state.
Procedure
Open the Change Request form.
Open the form context menu and select Configure > UI Actions.
Locate and open the existing Implement UI action.
Open the form context menu and click Insert and Stay to create a duplicate record.
Modify the following fields with new values.
| Field | Values |
|---|---|
| Name | Complete. |
| Action name | state\_model\_move\_to\_complete. |
| Hint | Progresses change to Complete state. |
| Onclick | `moveToComplete();`. |
| Condition | gs.hasRole('itil') && new ChangeRequestStateHandler(current).isNext("complete") |
| Script | Update function, state name, and state value. |
- Click Update.
Parent Topic:Tutorial: add a new change management state
Previous topic:Update the state model script include
Next topic:Create a process flow record