Scoped App - Getting error when calling a REST call in scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2019 04:26 PM
There is a scheduled job which is calling a script include which inturn is calling the REST message.
Working fine when done in global scope, but I move the same code in scoped app, I am getting following error:
Cannot find function getMessage in object TypeError: Cannot find function setAuthentication in object [object RESTMessageV2]..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 09:16 AM
Can we cal 'GlideImportSetLoader' from the scoped app ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2019 04:57 AM
I experienced the same in a scoped app. It appears that you'll have to use "setAuthenticationProfile()" instead. (so not "setAuthentication" as the script preview suggests.)
Source: https://developer.servicenow.com/app.do#!/api_doc?v=kingston&id=r_RMV2-setAuthenticationProfile_S_S
(Please mark this as your solution if it worked for you as well.)