Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
GlideJellyRunner API not available to scoped applications - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • GlideJellyRunner API not available to scoped applications
KB0596105

GlideJellyRunner API not available to scoped applications


3410 Views Last updated : Oct 16, 2023 public Copy Permalink
KB Summary by Now Assist

Description

When trying to use the GlideJellyRunner class within a scoped application, the following error message appears:
"GlideJellyRunner is not allowed in scoped applications"

Steps to Reproduce

1. Create a scoped application (such as a record producer) that contains a script referencing a script include that utilizes the GlideJellyRunner class. For example:

gs.include("FormInfoHeader");
var fi = new FormInfoHeader();
var s = 'This OCIO Request was opened for you.<br/>';
s += 'The OCIO team will contact you shortly.<br/>';
s += 'You can track status from the <a href="home.do" class="breadcrumb" >Homepage</a> <br/>';
fi.addMessage(s);

2. Inside the globally scoped FormInfoHeader script include, reference the GlideJellyRunner() class:

gs.include("PrototypeServer");

var FormInfoHeader = Class.create();

FormInfoHeader.prototype = {
initialize: function() {
},

addMessage: function(message) {
var jr = new GlideJellyRunner();
jr.setEscaping(false);
jr.setVariable('jvar_text', message);
var m = jr.runFromScript('<g:form_info_header/>');
gs.addInfoMessage(m);
}
};

3. This code will fail with the following error: GlideJellyRunner is not allowed in scoped applications

Workaround

Use a global script include to wrap the unavailable API to make it available within the scoped application.

JellyRunner script include: 

var JellyRunner = Class.create();
JellyRunner.prototype = {
initialize: function() {
},
get: function(jelly) {
var jr = new GlideJellyRunner();
return jr.run(jelly);
},

type: 'JellyRunner'
};

 

Background script using GlideJellyRunner by wrapping it in global script include: 

var jelly = '<?xml version="1.0" encoding="utf-8" ?><j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"><div>Hello World</div></j:jelly>';

var jr = new global.JellyRunner();
gs.info(jr.get(jelly));


Related Problem: PRB656613

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.