- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2021 06:55 AM
Hello,
I have a before query business rule on incident table.
I want the script to run ONLY when the user sees the incidents on a table on service portal.
The script of the business rule SHOULD NOT run when the user sees incidents on backend.
How can I make this?
Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2021 02:17 AM
Hi,
Can you add that in the script section?
if that doesn't work then use this
gs.action.getGlideURI().toString().indexOf('csm') > -1
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
02-18-2021 02:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2021 02:17 AM
Hi,
Can you add that in the script section?
if that doesn't work then use this
gs.action.getGlideURI().toString().indexOf('csm') > -1
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
07-20-2022 09:00 AM
I suggest this condition
if(GlideTransaction.get().getRequest().getHeader("referer").indexOf('/sp?') > -1)
Because in back office the URI contains sparam which also contains sp.