How to detect user working on UI or Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hi All,
Kindly help me here,
gs.action.getGlideURI().toString().startsWith('api/now/sp'); in ServiceNow ,
will this code like detect Custom Portal ? how it detect custom portal(/abcdef)? when I open record, when I raise request from /abcdef portal.
or which is right way to identify
on Table Record - OnSubmit Client script - UI type : ALL
Isolated Script = True
I want to run set of code when user perform any activity (example : update Category = Hardwarre) in Portal , other different set of code when he perform same activity (example : update Category = Hardwarre) from UI .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
@Supriya25 You need to look for syslog_transaction table.
You need to watch on URL signatures like sp or /nav_to.do
Mark my response as helpful if it helped you.
Thanks,
Mahesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi ,
I didn't get you , why do we need syslog_transaction table?
I'm looking for the solution , there want to execute two different blocks of code from single OnSubmit client script.
I found some references already : https://www.servicenow.com/community/servicenow-ai-platform-forum/detect-user-working-in-ui-or-servi...
https://www.servicenow.com/community/developer-forum/how-to-script-if-serviceportal-client-script/m-...
in my case mine is not /sp OOB portal , my portal is Custom Portal /abcdef.
will this Window===null works for all types of Portals or Only OOB portal /sp.