21 views

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

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-08-20 17:06:45
Published:2018-08-21