Cannot find function getWidgetFromInstance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2016 08:01 AM
I'm trying to create a new header widget for use in a new service portal and I keep getting an error about the "getWidgetFromInstance" function when I try to fetch my menu.
js_includes_sp.jsx?v=05-16-2016_1044&lp=Tue_May_24_10_45_09_PDT_2016&c=2_42:71072 Server JavaScript error Cannot find function getWidgetFromInstance in object com.glide.service_portal.widget.fencing.ScopedSPScriptable@1044129.
Here is the server side code.
data.login_page = $sp.getValue('login_page');
var menu = $sp.getValue("sp_rectangle_menu");
data.menu = $sp.getWidgetFromInstance(menu);
It is the same first three lines that are in the stock header widget, so I have no idea why it can't find the function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 05:10 PM
The instance references a widget... if you click on the menu from the portal, you just need to add the "widget" field to the form and from there you can specify which widget the menu uses. However I think you will find it's a little harder to clone that widget as it has ng-templates and one of those templates is referenced from a directive on the file system. This is a known defect, but only affects you if you absolutely cannot use the menu system that ships.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2016 09:47 PM
if you click on the menu from the portal, you just need to add the "widget" field to the form and from there you can specify which widget the menu uses
FYI: The 'widget' field is not displayed by default within the portal->menu form. Now it makes finally makes sense! Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 11:19 AM
Hi,
Any inputs on this issue. I am working in scoped portal and seeing the error message as stated above.
Regards,
Sujan