Skip to content

Commit 24b87b6

Browse files
authored
Create UIaction.js
1 parent 5da39f5 commit 24b87b6

File tree

1 file changed

+18
-0
lines changed
  • Client-Side Components/UI Pages/Resolve Incident UI Page

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function ResolveIncident() {
2+
var dialog = new GlideModal("resolve_incident");
3+
dialog.setTitle("Resolve Incident");
4+
dialog.setPreference('sysparm_record_id', g_form.getUniqueValue());
5+
dialog.render(); //Open the dialog
6+
}
7+
8+
9+
// Navigate to System UI > UI Actions.
10+
// Create a new UI Action with the following details:
11+
// Name: Resolve Incident (or a descriptive name of your choice).
12+
// Table: Incident [incident].
13+
// Action name: resolve_incident_action (must be a unique, server-safe name).
14+
// Order: A number that determines the position of the button on the form.
15+
// Client: Check this box. This is crucial for running client-side JavaScript.
16+
// Form button: Check this box to display it on the form.
17+
// Onclick: ResolveIncident() (This must match the function name).
18+
// Condition: Set a condition to control when the button is visible (e.g., current.active == true).

0 commit comments

Comments
 (0)