- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 04:37 AM
Hello everyone,
I'm just wondering how to show a pop-up inside the window which opens after we click the Lookup using list option.
Let's say I'm overriding the reference qualifier for caller field in the incident table to only users who have itil role. Now when anyone click the Lookup using list (magnifying glass icon) a window opens with list of users which we can select. But in the pop-up window I want to display a message "Only users with ITIL role can be selected. If you don't see the required user please provide the ITIL role to the user".
Info message to be displayed inside the highlighted area.
If anyone has accomplished this requirement please post your solution in the comments, it will be really helpful.
Regards,
Tharun.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 06:54 AM
then use Query BR on sys_user table and use this in condition
gs.action.getGlideURI().toString().indexOf('sysparm_target=incident.caller_id') > -1 && gs.hasRole('itil')
(function executeRule(current, previous /*null when async*/) {
// Add your code here
gs.addInfoMessage('Only users with ITIL role can be selected. If you don't see the required user please provide the ITIL role to the user');
})(current, previous);
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
12-16-2024 05:10 AM
it would be challenging to show the message when the lookup is clicked
why not show that message as field message besides your field itself?
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
12-16-2024 06:28 AM
Hi @Ankur Bawiskar ,
Thank you for your response. Unfortunately our functional stakeholders are not agreeing to display the message in form level. They want it inside the popup window as that will be more intuitive.
Regards,
Tharun.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 06:54 AM
then use Query BR on sys_user table and use this in condition
gs.action.getGlideURI().toString().indexOf('sysparm_target=incident.caller_id') > -1 && gs.hasRole('itil')
(function executeRule(current, previous /*null when async*/) {
// Add your code here
gs.addInfoMessage('Only users with ITIL role can be selected. If you don't see the required user please provide the ITIL role to the user');
})(current, previous);
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
12-16-2024 08:24 AM
Hi @Ankur Bawiskar ,
It worked like magic.
gs.action.getGlideURI().toString().indexOf('sysparm_target=incident.caller_id') > -1
The above condition is what I was looking for. Thank you so much!
Regards,
Tharun.