927 views

Description

Catalog Client Scripts do not work in Service Portal when the UI Type is set to Desktop.

Steps to Reproduce

In Service Catalog:

  1. Navigate to a catalog item

    For more information, see the product documentation topic Service catalog items

  2. Right-click in the header and select Configure Catalog Client Script

  3. Click New and create a new onload client script with the following script content:

    function onLoad() { //Type appropriate comment here, and begin script below alert("test script catalog client script."); }
  4. Set the UI type as Desktop

  5. Save the catalog client script

  6. Navigate to Service Portal and open the catalog item there

    The URL resembles the following example:

    https://<Instance_name>.service-now.com/sp?id=sc_cat_item&sys_id=51b5d9170a0a0b0c00b519afdeb51697

Workaround

This is expected behavior. In Service Portal, only client scripts with the UI Type of Both or Mobile are loaded.

Set the correct UI Type, ensure the catalog client script is compatible with mobile scripting APIs - then Service Portal will execute them properly.


Related Problem: PRB676011

Seen In

Fuji Patch 12 Hot Fix 1
Geneva Patch 4
Helsinki
Helsinki Patch 0 Hot Fix 1
Helsinki Patch 1
Helsinki Patch 2
Helsinki Patch 3
Helsinki Patch 5

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-04-18 05:52:09
Published:2018-04-18