Skip to content

Commit b2751a2

Browse files
Fix alert in UI action 'Mark Records Inactive UI Action' (ServiceNowDevProgram#748)
* Create style.css * Create readme.md * Delete Styles/Add Background Color directory * Update listAction.js Updated the script to replace 'alert' with 'GlideModal' as per issue ServiceNowDevProgram#745 * Update readme.md updated the readme file to include the changes made in listAction.js * Update readme.md --------- Co-authored-by: niamccash <[email protected]>
1 parent fd7563e commit b2751a2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

UI Actions/Mark Records Inactive - List Action/listAction.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ function markInactive() {
1515

1616
function ResponseFunction(response) {
1717
var answer = response.responseXML.documentElement.getAttribute("answer");
18-
alert(answer.toString());
18+
//alert(answer.toString());
19+
// Commented above code and replaced it with GlideModal
20+
var gm = new GlideModal("glide_alert_standard", false, 600);
21+
gm.setTitle("Info Message");
22+
gm.setPreference("title", answer.toString());
23+
gm.setPreference("warning", "false");
24+
gm.render();
1925
}
2026
}

UI Actions/Mark Records Inactive - List Action/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ mark the records as inactive by calling the reusable script include. Process is
55
3. Keep your script include ready with the function to make records inactive and done.
66

77
You can even modify the scrip include to change other fields too based on your requirements. And you do not need to pass any table name also. This is complete generic.
8+
9+
**UPDATE:**
10+
_Replaced standard Javascript Window method 'alert' with GlideModal as per issue #745. This completes the task 'Mark Records Inactive UI Action'_

0 commit comments

Comments
 (0)