Catalog Item Widget Failing on Record Producer in Service Portal

proco
Tera Contributor

We're currently working on implementing a service portal and are making a number of our record producers available there for our users. I've run into one specific record producer that fails when trying to display it using the out-of-the-box SC Catalog Item widget (widget-sc-cat-item-v2).

find_real_file.png

The console error I'm getting is:

TypeError: Cannot set property 'attachment_action_in_progress' of undefined
    at Object.setAttachments (widget-sc-cat-item-v2.js:242)
    at js_includes_sp.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:12181
    at processQueue (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:14223)
    at js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:14238
    at Scope.$eval (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:14791)
    at Scope.$digest (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:14699)
    at Scope.$apply (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:14818)
    at done (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:11441)
    at completeRequest (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:11558)
    at XMLHttpRequest.requestLoaded (js_includes_sp_libs.jsx?v=03-31-2020_1417&lp=Mon_Apr_13_08_46_48_PDT_2020&c=30_552:11508)

As far as I can tell, there's nothing different about this particular record producer than the other ones we have in place. It works perfectly fine from within the platform. I've set the UI type to ALL for the associated Catalog Client Scripts. I just have no idea why this particular producer would trigger an error in the stock widget when none of our other ones do.

This is from our DEV environment, which is Orlando, but I confirmed it also happens in PROD, which is New York.

Thanks!

1 ACCEPTED SOLUTION

Amar Kutlaria
Mega Guru

Cause


If the variables are mapped to wrong fields of the record table or the type of the variables and the type of the field doesn't match, the SC Catalog item widget will be failed as it cannot map the variables to the correct fields.

Resolution

In order to resolve the issue, the users have to change the map to the field to something that is compatible

 

Reference article: https://hi.service-now.com/kb_view.do?sysparm_article=KB0728432

 

How to Troubleshoot Failing Widgets in Service Portal

https://hi.service-now.com/kb_view.do?sysparm_article=KB0685163

View solution in original post

2 REPLIES 2

Amar Kutlaria
Mega Guru

Cause


If the variables are mapped to wrong fields of the record table or the type of the variables and the type of the field doesn't match, the SC Catalog item widget will be failed as it cannot map the variables to the correct fields.

Resolution

In order to resolve the issue, the users have to change the map to the field to something that is compatible

 

Reference article: https://hi.service-now.com/kb_view.do?sysparm_article=KB0728432

 

How to Troubleshoot Failing Widgets in Service Portal

https://hi.service-now.com/kb_view.do?sysparm_article=KB0685163

proco
Tera Contributor

Thanks. I took a closer look and whoever wrote the original record producer has a UI Page(!) as the first variable. There's no "question" value for it. And it looks like one of the Catalog Client Scripts decides whether to display that UI Page within the record producer based on a date evaluation (this producer is so our students can check in their university-provided laptops - but there needs to be a valid check-in session).

Looks like I'm going to have some re-writing to do.