- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2015 01:38 PM
Hi All,
I've created a small scoped app that has a widget and UI page. When Adding the widget to my homepage I get the following error:
GlideForm is not allowed in scoped applications
The render function of the widget contains the following code based on code from the wiki (Creating a Custom Homepage Widget - ServiceNow Wiki)
I have modified the code by pre-pending 'global' to the renderer object
If GlideForm is not allowed in scoped applications, how does one create a custom widget for inclusion in their app? I played around with various things, like adding the global namespace in front of the GlideForm, and various other things.
The widget gets added to the homepage, but only 'null' is displayed in the content section. See image:
Thanks in advance for any help that can be provided.
Brian.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2015 04:25 PM
Hi Brian and Paul,
I have figured this out if you are still interested and haven't figured it out on your own yet. There have actually been a few changes it seems to the API for widgets. GlideForm is no longer needed directly and the renderer's interface has changed.
Now you need only two things:
renderer.getPreference(<preference name>) => replaces renderer.getPreferences().get(<preference name>)
renderer.getRenderedPage(<ui page name>) => replaces GlideForm, setDirect, setRenderProperties, etc
So your render script should now look like:
function render() {
var name = renderer.getPreference('name');
return renderer.getRenderedPage(name);
}
Dynafrom Wang, you may be interested in this as well given your Hackathon Bootstrap CMS. This can help you get it out of the global scope

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2015 10:54 AM
I have updated the wiki to include code samples for scoped applications for both Widgets and Gauges. Thanks to Travis Toulson and Stephen Farrar for supplying the new renderer.getPreference() and renderer.getRenderedPage() methods and the need to add an application scope respectively.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2016 07:26 PM
Hi Vaughn,
Thanks for the updates in the wiki. When I followed the steps I found that the scope was getting duplicated in the widget UI page URL if the scope call is in both the render() and getEditLink() functions as it currently has in docs/wiki. Following tltoulson and stephenfarrar advice I removed the scope from the render function and works great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2017 11:40 AM
Is it possible to use this in a ServicePortal widget? Not sure where renderer is defined?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2017 12:44 PM
Hi Daniel,
UI pages, UI macros and Jelly are not supported in Service Portal. If you want custom functionality in Service Portal you would want to create it using Angular in a portal widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2017 12:48 PM
Hi Ann,
I understand that. Since there isn't a notification preferences widget, I'm trying to avoid re-writting it and hoping to just present it in the ServicePortal.
Dan