Publish to Hardware Catalog redirects to Record Not Found due to the use of "gr" in global scope in the publish_to_product_catalog UI Page Processing Script.

If a custom script that also uses 'gr', such as a business rule, is also involved in the transaction, then the catalog item gr is clobbered by that instead, meaning we use the wrong sys_id or 'undefined' in the URL.

Steps to Reproduce

This is not reproducible out of the box. It requires something like a custom business rule that also uses "gr' variable name being involved in the creation of the catalog item. e.g. a Query business rule on sys_user, but conceivably any javascript involved in the transaction.


This problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this form to be notified when more information will become available.

If the other script using 'gr' cannot be identified, then it is possible to workaround this by renaming the "gr" variable in the publish_to_product_catalog UI Page Processing Script to e.g. "gr2".

More details on the general cause is available in:
KB0713029 Best Practice: Why using 'gr' as a GlideRecord variable name in custom scripts is always a bad idea

Related Problem: PRB1351676

Seen In

Eureka Patch 11
Fuji Patch Hot Fix 1
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-08-12 15:09:52