Embedding Portal Pages

Over the past couple of years I've ran into several scenarios in which I've wanted to embed a portal page into the standard UI (UI16 specifically) for various reason. While typically this has been done with UI Pages, I kind of hate Jelly. So I'll generally take every approach I can to avoid this.

I found a really handy blog post on the community by Matt Metten that I've returned to several times to accomplish this goal. This post primarily talks about the different ways to serve up a Portal page by changing up the URL. But it's really the third and fourth way that he talks about that interests me the most. Using these methods you can actually embed the page in the standard UI, with or without the the portal header, menu and theme.

You may be wondering why you'd ever want to do this. We've found it particularly helpful when trying to present the Service Catalog in our standard UI. Trying to maintain the old CMS catalog page by remembering to place new categories on the page and so on was a bit of a pain. We really try to only maintain something in a single place. By embedding the Portal Catalog page into the standard UI and steering our fulfillers away from the default CMS catalog page, we achieve our goal of a single, maintainable catalog. Additionally, I've found reason to embed a catalog item into the standard UI or a dashboard. Again, we wanted this to come through the portal experience to provide a singular experience (and so we didn't have to worry so much about how scripts function in the CMS item vs the Portal item).

Presenting a catalog page inside the Standard Platform UI

With the Portal Theme

To present a portal page within the Standard Platform UI, you must build out the URL. To embed the full Portal page into the the standard UI, you are looking at combining both the portal URL and the basic schema for a system url. So the example below is created with the URL {instance}.service-now.com/nav_to.do?uri=/sp/?id=sc_landing

As you can see, the menu and theme are both captured as part of this URL. So while you maintain the normal user experience with the left hand navigation, you will also see the portal menu along the top of the embedded portal page.

You could circumvent this by creating a custom portal specifically for embedding in your instance, but if theme is not important to you then I recommend the second solution.

Without the Portal Theme

This second solution is the one that I use the most. This presents the portal page only. You will not see the menu nor the portal theme by using the following URL structure. {instance}.service-now.com/nav_to.do?uri=$sp?id=sc_landing

Personally, I more frequently use this method. Yes, you lose your theme. I feel, though, that it presents a better user experience for our fulfillers. There is no secondary portal menu. And it looks nice.

Once you've decided what kind of URL you want to use and you've built it, you can do so much with it. You can create Modules that link directly to your portal catalog page. You can link directly to catalog items through the portal view instead of the CMS view. Or perhaps you want to display a category of Knowledge Base articles in a relevant dashboard and take advantage of the widgets on the portal page.

An example of something a bit different that I've done was to embed our "Report a Defect" item into our ServiceNow Upgrade dashboard so our process owners could easily report defects directly from the Dashboard. To do this, I simply created a Static Content widget for your dashboard then drop in some code with an i-frame (I know, don't shoot me) that connects to the URL you build above.

Want to Learn More about Building ServiceNow URLs? Visit the Docs for a fairly comprehensive guide.

Paige

she/her

2021,2022 ServiceNow Developer MVP | Co-Founder, WomenNow.SN

Previous
Previous

Quick and Easy Upgrades, Part 1

Next
Next

Community!