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.
GlideRecord Client API does not work in the Service Catalog standard UI but works in Service Portal - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • GlideRecord Client API does not work in the Service Catalog standard UI but works in Service Portal
KB0694090

GlideRecord Client API does not work in the Service Catalog standard UI but works in Service Portal


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

Description

GlideRecord Client API does not work in the Service Catalog standard UI but works in Service Portal. Note that this is expected behavior in the Service Catalog standard UI per the documentation topic GlideRecord - Client ("Client-side GlideRecord is not supported in scoped applications").

Steps to Reproduce


1. Install the Customer Service" plugin.
2. Once installed, switch to the Customer Service Application from the Settings menu.
3. Navigate to Maintain items > Create Case.
4. Go to Accessibility > Catalogs and add "Service Catalog".
5. Save.
6.Go to the Catalog Client Scripts tab and add an onLoad client script with following code:

function onLoad() {
//Type appropriate comment here, and begin script below
var rec = new GlideRecord('incident');
rec.addQuery('number', "INC0010033");
rec.query(func);

function func() {
while (rec.next()){
alert(rec.number);
}}}

7. Make sure that the UI Type is set to "All".
8. Click Try it on the Create Case record producer.
You will not get any alerts and will see an error in the browser console: "TypeError: GlideRecord is not a constructor"
9. Navigate to Service Portal and search for Create Case.
When you open the item, you will get an alert message with "INC0010033" and no errors on the console.

Workaround

This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.

 


Related Problem: PRB1296337

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.