- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 07:37 PM
I would like to have an on-screen alert for a specific group when an incident is created.
I want to call the UI Script from OnSubmit's ClientScript, but it does not work.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 09:27 PM
Hi KS,
UI Script from Client Script is not supported in Service Portal. Select UI Type = "Desktop" and check "Global".
Then, the function can be called from Client Script.
function onSubmit() {
showPopup();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 07:56 PM
Hi,
check this out
Call UI Script From Client Script | Practical Demonstration
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
‎03-22-2022 08:28 PM
Hi,
You can directly call with function name in client script.
function onSubmit(){
showPopup();
}
Regards,
Harshal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 09:27 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 01:26 AM
function onSubmit() {
var groupName = 'ITIGROUP';
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', g_user.userID);
gr.addQuery('group.name', groupName);
gr.query(function(gr) {
if (gr.hasNext()) {
alert('Incident is Created');
}
});
}