Skip to content

Commit 5187a02

Browse files
authored
Add README for CI selection validation script
This README explains the validation of CI selections using GlideAjax in a client script, detailing its purpose, usage, and functionality.
1 parent cdde65d commit 5187a02

File tree

1 file changed

+24
-0
lines changed
  • Client-Side Components/Catalog Client Script/Validate CI selection via GlideAjax with submit guard

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Validate CI selection via GlideAjax with submit guard
2+
3+
## What this solves
4+
End users sometimes pick CIs that are retired or unsupported for fulfilment. This client script validates a selected CI using GlideAjax and prevents submission if the CI fails checks.
5+
This could also be used where some CIs are supported by third parties and prevent use in incorrect forms.
6+
7+
## Where to use
8+
- Catalog Item with a reference variable to `cmdb_ci`
9+
- Add the client script as an onChange on that variable
10+
- Install the Script Include in the same scope
11+
12+
## How it works
13+
- onChange reads the selected CI sys_id
14+
- Calls Script Include via GlideAjax
15+
- Server checks for active CI and support group presence
16+
- Client displays messages and disables submit if invalid
17+
18+
## References
19+
- GlideAjax
20+
https://www.servicenow.com/docs/bundle/zurich-api-reference/page/app-store/dev_portal/API_reference/GlideAjax/concept/c_GlideAjaxAPI.html
21+
- GlideForm client API
22+
https://www.servicenow.com/docs/bundle/zurich-api-reference/page/app-store/dev_portal/API_reference/GlideForm/concept/c_GlideFormAPI.html
23+
- GlideRecord
24+
https://www.servicenow.com/docs/bundle/zurich-api-reference/page/app-store/dev_portal/API_reference/GlideRecord/concept/c_GlideRecordAPI.html

0 commit comments

Comments
 (0)