- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2018 07:43 AM
Hi all,
In developing an order guide, it has been put on me to display alerts based on options chosen on the form. While this is very simple, an I had an idea. Basic JavaScript alerts in my opinion would take away from the aesthetic of the service portal, it has it's own alert system so why not use it? (I am referencing gs.info('message here');) Is there a way to check whether the user is using the service portal or the platform? My goal here is to use the basic JavaScript alerts for the platform, and the service portal alerts for the service portal, something like this.
if(using service_portal){
gs.info('this is a message');
}else if(using platform_view){
alert('this is also a message');
}
Thanks!
-Justin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2018 07:47 AM
Hi Justin,
If you want to check this in onLoad have this:
check if url contains /sp
check below links:
https://community.servicenow.com/community?id=community_question&sys_id=85e68fa5db1cdbc01dcaf3231f96198c
https://community.servicenow.com/community?id=community_question&sys_id=68e2bbd3dbecdb840e3dfb651f96192a
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
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
‎10-29-2018 07:47 AM
Hi Justin,
If you want to check this in onLoad have this:
check if url contains /sp
check below links:
https://community.servicenow.com/community?id=community_question&sys_id=85e68fa5db1cdbc01dcaf3231f96198c
https://community.servicenow.com/community?id=community_question&sys_id=68e2bbd3dbecdb840e3dfb651f96192a
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader