- 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 06:33 AM
link shared by @palanikumar should help, you should enhance it as per your logic in catalog client script
Ensure you detect the correct HTML element
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 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 02:08 AM
You should update the logic in a way that form gets submitted only if the response is true. You can use this code
function onSubmit() {
if (g_user.hasRole('sn_customerservice_agent')) {
var ga = new GlideAjax('catalogUtils');
ga.addParam('sysparm_name', 'hasExistingRITM');
ga.addParam('sysparm_account', g_form.getValue('account'));
ga.addParam('sysparm_userId', g_form.getValue('contact_name'));
ga.addParam('sysparm_catalogItem', g_form.getUniqueValue());
ga.getXMLAnswer(setData);
return false; // Cancel the form submission
}
}
function setData(response) {
var answer = response;
alert('reponse' + answer);
if (answer == 'false') {
alert(getMessage('You are not allowed to order as there is an existing request for this customer'));
} else {
alert("else if alert");
g_form_submit(); // Submit the form only if the response is true
}
}
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 05:28 AM

- 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