Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Restricting UI actions based on conditions

Log in to subscribe to topics and get notified when content changes.

Restricting UI actions based on conditions

You can include scripts in the Condition field of the UI Action form. The condition must evaluate to true for the action to appear.

Using the UI action condition builder

If you leave the field empty, the condition defaults to true. For example, the following condition is configured for the Close Incident button:

Condition statement
For this action to appear on a form, these conditions must evaluate to true:
  • current.incident_state must equal 6: The incident must already be in a Resolved state.
  • gs.hasRole("itil_admin"): The current user must have the itil_admin role.
OR this condition must evaluate to true:
  • gs.getUserID() == current.caller_id: The current user is the user who requested the change.
  • The current object is not available for conditions on a list context menu (the List context menu check box is selected). Any use of current on these actions is ignored.
  • You can reference the parent record for the UI action conditions on a related list button. For example, to disable the New and Edit buttons on the Affected CIs related list for closed changes, copy the global m2m UI actions to the task_ci table and add a condition of