- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 01:28 AM
Hello Community !
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 05:34 AM
Did you try this solution?
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 06:50 AM
this worked for me in onLoad catalog client script
I hope I answered your question and you can enhance it further.
function onLoad() {
var element = this.document.getElementsByClassName('btn btn-primary btn-block text-overflow-ellipsis ng-binding ng-scope');
element[0].style.display = 'none';
}
Output:
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 01:32 AM
Hi,
GlideAjax calls are run async, so the script is completed and the form is submitted before you get the answer back from the call. Switch your script to run as an onChange client script instead of the onSubmit one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 01:39 AM
@OlaN in onchange, How to retrict the form submission

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 01:45 AM
I'm guessing you are restricting the form based on that you have one (or more) mandatory field to fill in.
For example the user selected.
When changing the user, do the check with the script, and if the user is not allowed, empty the field, so another user must be selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 01:46 AM
you should use onChange client script and show error message for that field
This will ensure user passes the validation and selects the correct info and then only form will get submitted.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader