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.
Service Portal: Catalog UI policy fails for scoped application catalog items - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Service Portal: Catalog UI policy fails for scoped application catalog items
KB0695240

Service Portal: Catalog UI policy fails for scoped application catalog items


2588 Views Last updated : Nov 2, 2022 public Copy Permalink
KB Summary by Now Assist

Description

Catalog UI policies with scripts on scoped application catalog items do not work on Service Portal.

Steps to Reproduce

  1. Install the Human Resources Scoped App: Service Portal [ com.sn_hr_service_portal] plugin with demo data.

  2. Select Human Resource: Service Portal from Application picker.

  3. Go to the Disciplinary Issue Inquiry record producer (http://instance-name.service-now.com/nav_to.do?uri=sc_cat_item_producer.do?sys_id=03c78de49f331200d9011977677fcfa4).

  4. Create new Catalog UI Policy with the following values:


    • Run scripts in UI Type: All
    • Run scripts: true
  5. Navigate to http://<instance-name>.service-now.com/hrportal.

  6. Select the Disciplinary Issue Inquiry catalog item (http://instance-name.service-now.com/hrportal?id=hri_sc_cat_item&sys_id=03c78de49f331200d9011977677fcfa4).

  7. Check for console errors.

    The following errors appear:

    (g_env) [UI:SCRIPT_TRUE] Could not load UIPolicy script for policy "Qualifying Period"
    (g_env) [UI:SCRIPT_FALSE] Could not load UIPolicy script for policy "Qualifying Period"
    UI policy script error: TypeError: Cannot read property 'execute' of undefined

 

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.

On instances that can not be upgraded yet, it is possible to set isolate script to false to resolve this issue for globally scoped UI Policies. If the custom function is defined within the onCondition function block, the UI Policy is executed. For example:

function onCondition() { 
 function callAlert() { 
alert("calling custom function"); 
} 
callAlert(); 
} 

Related Problem: PRB1078186

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.