- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2021 11:16 PM
Hi Team,
I'm having two views let's say 'x' and 'y'.
if the page I'm opening is portal then I want to force view x and if it's standard UI (backend) then I wanted to show view y.
For this to happen I'm writing a script in the view there I want to get the URL of the standard UI in the server side code??
Thanks In Advance,
Balaraju KB
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2021 11:19 PM
Hi,
this line should give you the URL in server side
var url = gs.action.getGlideURI().toString();
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
‎06-06-2021 11:38 PM
Hi,
inside view rule script
for standard URL are you in custom scoped application?
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
‎06-06-2021 11:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2021 11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2021 12:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2021 12:13 AM
Hi,
the view rule you create will run only for Standard Native UI - Browser
refer below link for forcing view on portal
Adventures in Service Portaling: The Form Widget
Also how are users visiting the portal to see the records?
If it is using form widget then refer below link for steps
how i can set a special view for portal and special view for backend(form)?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader