
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2019 06:45 AM
Hi All,
I am building Service Portal in the scoped application and cloned typeahead search widget along with all dependency scripts. However, I am facing the below issue.
Server JavaScript error Cannot find function getSearchSources in object com.glide.service_portal.widget.fencing.ScopedSPScriptable@dcaa96.
I search for an alternative method of getSearchSources() in Scoped application, but I didn't get anything.
Search Suggestion is also not working.
Is there any other approach to set a custom search in the service portal?
Any help would be appreciated.
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 06:06 AM
Okay,
The server script section needs to be modified. Couple of things you will have to think about... There are several global libraries used in the server script section of the widget, that may or not be accessible in scoped apps. So be prepared for the possibility this may not work at all.
You have to see if scoped apps allow you to access APIs like gs.hasRightsTo (looks like it doesn't allow it), GlideTableDescriptor, and GlideDBObjectManager to start with (there may be more, but saw those at a glance).
I don't think you will be able to get access to those APIs in scope but try. Your system logs may have some server side errors/warnings indicating issues on the server script that you can troubleshoot.
BTW, I have had to clone the form widget before, and it worked fine, but I did it in Global scope. If you aren't planning to put this app on the store, you can also just clone the widget in global scope, but use it in your scoped app on a page. I have done that before successfully.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 04:00 AM
Hi All,
Could anyone help me with this?
@pradeep.sharma, @chucktomasi, @nathanfirth, @chrisburks, @bradtilton
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 04:13 AM
Hi Nikita,
Please make sure your cloned widget is in global scope or other. if this is in another scope, so it will be give that type of error.
Let me know once you check the scope.
Thanks,
PKG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 05:06 AM
Hi Prins,
Yes, the widget is in another scope.
What can be done if the typeahead-search widget, I wanted to be in the scope application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 05:25 AM