- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 09:03 PM
Hi,
I need pop message on catalog item like " Please refer to the links for standard firewall service request . Hence request cannot be submitted." and this not summitted.This page just stay same page and just pop the msg on the top of the page.
Thank you.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 09:43 PM
Hi,
then do this
function onSubmit() {
// give variable name and the correct choice value
if(g_form.getValue('variableName') == 'global'){
alert('Please refer to the links for standard firewall service request. Hence request cannot be submitted.');
//Abort the submission
return false;
}
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 09:12 PM
Hello Siva
you can use OnSubmit catalog client script.
to add pop message, you can use alert. and use return false so item will not get submit.
function onSubmit() {
alert('Please refer to the links for standard firewall service request . Hence request cannot be submitted.');
//Abort the submission
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 09:30 PM
Hi prasad,
Thank you for fast reply and helping on my query,
Its helpful, But I have small change on my requirement.
I have one variable("Please select the type of firewall change required") on my catalog item ",
For this varible having 2 choice :- 1. standard
2. Global
I want work this functionality on for 2. Global choice.
Please refer the attachment for reference.
Can u please help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 09:13 PM
@Siva
You can use onSubmit() client script here and use below logic:
alert('Your text here');
return false; //use this to restrict the submission of the form
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 09:34 PM
Hi Siva,
Add one more if statement:
function onSubmit() {
if(g_form.getValue('variable_name')=='Value') //Map Please select the type of firewall change required variable name here
alert('Please refer to the links for standard firewall service request . Hence request cannot be submitted.');
//Abort the submission
return false;
}
Hope it helps
Thanks
Murthy
Murthy