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.
Reference qualifier on a variable calling a script include does not work for non-logged in users - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Reference qualifier on a variable calling a script include does not work for non-logged in users
KB0595458

Reference qualifier on a variable calling a script include does not work for non-logged in users


8720 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Reference qualifier on a variable for a record producer in CMS calling a script include does not work for non-logged in users.
When a non-logged in user clicks on a reference field that contains this reference qualifier, it returns with a blank pop-up page.
If the same reference qualifier is used on a normal form field, it works properly.

Steps to Reproduce

  1. Navigate to a catalog item that is already present on OOB /ess site (for example, Something Broken)
  2. Make this catalog item public by adding the public role on the Roles field
  3. Open up the variable of this catalog item named caller_id and put the public role to Read roles, Write roles, and Create roles
  4. Now this variable is referencing sys_user, so create a table read ACL on sys_user to allow public user access
  5. Navigate to sys_public.list and add in the pages: sys_user and sys_user_list (so public users can access those pages)
  6. Create a script include to be used for an advanced ref qual on this variable. The script include can have one function that returns gs.log()
  7. On the variable advanced ref qual, call this script include Javascript: new MySI().myFoo();
  8. While not logged in, navigate to /ess and to that record producer
  9. If everything is done/set up correctly at to this point, as a non-logged in user you should be able to access the record producer on ess and see the reference variable
  10. Click on the reference variable: a blank pop-up page appears
    Error on the logs:
    null:357:626: <g2:list_record_sys_ref_list> java.lang.NullPointerException: java.lang.NullPointerException: com.glide.processors.xmlhttp.LightweightReferenceUtil.addQuestionReference(LightweightReferenceUtil.java:267)
    com.glide.list_v2.ListRecordSysRefListTag.isLightweightReference(ListRecordSysRefListTag.java:149)
    com.glide.list_v2.ListRecordSysRefListTag.initAdditionalQuery(ListRecordSysRefListTag.java:95)
    com.glide.list_v2.ListRecordDefaultTag.doTag(ListRecordDefaultTag.java:75)
    org.apache.commons.jelly.impl.TagScript.run(TagScript.java:299)
    org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
    org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
    org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
    org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:94)
    org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
    org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
    org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
    org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:94)
    org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
    org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
    org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
    org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:94)
    org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
    org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
    org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:84)
    org.apache.commons.jelly.impl.TagScript.run(TagScript.java:299)
    com.glide.ui.jelly.GlideJellyContext.run(GlideJellyContext.java:600)
    com.glide.ui.jelly.GlideJellyContext.executeCompiledScript(GlideJellyContext.java:802)
    com.glide.ui.GlideFormPhase2.generate(GlideFormPhase2.java:51)
    com.glide.ui.GlideForm.generatePopulatedForm(GlideForm.java:637)
    com.glide.ui.GlideForm.quickExit(GlideForm.java:263)
    com.glide.ui.GlideForm.getRenderedPage(GlideForm.java:177)
    com.glide.ui.NavigationTransaction.writeOutput(NavigationTransaction.java:156)
    com.glide.ui.NavigationTransaction.process(NavigationTransaction.java:127)
    com.glide.ui.GlideServletUITransaction.process(GlideServletUITransaction.java:83)
    com.glide.processors.Processor.runProcessor(Processor.java:402)
    com.glide.processors.Processor.processTransaction(Processor.java:192)
    com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:146)
    com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:36)
    com.glide.ui.GlideServlet$1.run(GlideServlet.java:414)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    java.lang.Thread.run(Thread.java:682)

  11. Follow these same steps as a logged-in user and note that it works as expected

*Important: This only happens for a variable on a record producer for CMS. If the same ref qual is used on a normal reference form field, it works for non-logged in users and no errors occur.

Workaround

  1. Adding a Property glide.script.ccsi.ispublic. This property changes the visibility of client-callable script includes by making them all public or private. Configure the property as follows:
    • Name: glide.script.ccsi.ispublic
    • Type: true|false
    • Value: false
  2. Add the following method to the script include FormStateAjax:
isPublic: function() {
   return true;
  },

Related Problem: PRB667204

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.