- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 01:15 PM
Hello there
I have a requirement when a ritm is opened in portal it should show a view and if it is opened in native view it should show other view ,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 10:53 AM
workaround would be , identify the difference between your portal url and native UI url then you can use indexOf() here to execute if else block
eg:
if(url.toString().indexOf('<identify for url parameter which does not exist on portal>') == -1){
//do your activity for portal
}
else{
// do something for non portal
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 01:25 PM
Hi,
Check out below link-
https://community.servicenow.com/community?id=community_question&sys_id=67240729dbd8dbc01dcaf3231f961942
Mark correct if my answer has solved your issue and or/helpful if my response is worthy.
Thanks,
Ruhi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 07:42 PM
Thanks Ruhi
can we use

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 10:54 AM
No, it only works in client side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 10:53 AM
workaround would be , identify the difference between your portal url and native UI url then you can use indexOf() here to execute if else block
eg:
if(url.toString().indexOf('<identify for url parameter which does not exist on portal>') == -1){
//do your activity for portal
}
else{
// do something for non portal
}