Client script calling script include scope mismatch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 10:30 AM
I have created a scoped application that I am allowing most access to. I have a catalog client script which is trying to call a script include and I am getting a Script: x_unoci_rapid_retu.RRCall not found in scope: x_unoci_rapid_retu, and HTTP Processor class not found: x_unoci_rapid_retu.RRCall: no thrown error.
The client script looks like this
var ga = new GlideAjax('RRCall');
it is in an scoped application but the global checkbox is checked.
The script include:
var RRcourseinfo = Class.create();
RRcourseinfo.prototype = Object.extendsObject(AbstractAjaxProcessor,{
RRCall: function() {
The script include is also in the same scoped application but is accessible from all application scopes.
I have tried putting global.RRCall and the scope of the application x_unoci_rapid_retu in the client script but to no avail, and I have also tried putting global in the 2nd line of the script include here RRcourseinfo.prototype = Object.extendsObject(global.AbstractAjaxProcessor,{
I continue to get the same error each time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2019 10:38 AM
I'm sorry to hear that you are unable to get it working. I'm happy to assist you further if you would like.
If possible please share a screenshot of the current non-working code of the client script, script include and Outbound REST. The direction you were going was correct so if it is not working then it may just be due to a small typo or mis-configuration with the REST call. I know I have certainly had those type of issues before and one small update was all that was needed to get everything working.
--David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 03:23 PM
I also just noticed, the name of the script include is different than the defined variable that it is called by, could that be problematic? As an example the script include name is Rapid Return Course Call while it is defined in the script as RRcourseinfo throughout the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 03:40 PM
Yes the name of the script include needs to be the same as defined in the script, as well as, the class "type".
