- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2019 11:10 PM
Hi there,
I have cloned the OOB SC Catalog Item Deprecated widget and using it to show a record producers in portal. So far its working fine. But the "Add Attachments" section of the widget is not working. Whenever I am trying to attach any files the file selector is opening up but no file is getting attached. And also I am getting an error in the console as below:
Do I need to change something for record producers ? I have tried it with catalog item and its working fine there. Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2019 10:11 PM
Okay, so after further analysis got to know that this error was caused by another widget client controller. I was actually clearing the angular headers to overcome pre-flight response error (CORS) in another widget. Seems like whenever I upload any attachments, there is a REST API call to the attachments table and without the X-User token in the angular header it was throwing me 401 unauthorized error. I have passed the session id as X-User token in the angular header and the issue is solved now. Thanks for the help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2019 02:18 AM
Why are you using Deprecated widget? You can use clone the new one which is not Deprecated . ?Deprecated means servicenow has made some changes to the new SC cat item widget
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2019 04:04 AM
True, but its not related to the attachment functionality because its working for other catalog items. I have also tried with the new widget (SC Catalog Item) but still no luck. This issue is only happening for record producers. Its working fine for catalog items. Do I need to make some changes for scoped application as my record producers belongs to a scoped app.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2019 04:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2019 10:11 PM
Okay, so after further analysis got to know that this error was caused by another widget client controller. I was actually clearing the angular headers to overcome pre-flight response error (CORS) in another widget. Seems like whenever I upload any attachments, there is a REST API call to the attachments table and without the X-User token in the angular header it was throwing me 401 unauthorized error. I have passed the session id as X-User token in the angular header and the issue is solved now. Thanks for the help!