Manage attachments on public record producer in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2020 04:26 PM
Hi,
I have created a record producer to capture some information from the user who does not have any role on the instance. It is available for the public. I am rendering it through Service Portal. Have also created some widgets on the portal page. Everything is working fine except attachments. User with some role can easily add/remove attachments on the page but when user without any role (public user) is trying to attach, nothing is happening. In the console i see an error
Has anyone encountered this error ? If yes, can you please advise some workaround.
I am using attachment widget to manage attachments:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 05:42 PM
It worked for me.
I have some questions: I wanted it to accept more file types, so I added more extensions on line number 14 of Client controller like this:
After adding this, on submitting it started throwing error - "The following fields contain errors: Upload Attachments " (Upload attachments is the name of the variable I used).
Also I tried replacing txt with xlsx and it worked, so can we just mention two file types here or what else we need to modify to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2024 10:26 PM
@Ashutosh44 I tried the widget without any luck. Did you make any updates to the widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2024 10:24 PM
Hello Mario,
I tried the widget created by Krauzi but still having issues with uploading attachments. Did the widget work for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2024 01:35 PM
Install the following apps:
https://github.com/kr4uzi/ServiceNow-Multipart
https://github.com/kr4uzi/ServiceNow-Public-Catalog-Item-Attachments
Afterwards your Attachment Variables and the Attachment Icon/Button will work for public catalog items / record producers.
Note: While previous solution (posted on my [no longer used] business account) was bypassing ACLs, the new solution doesn't. This means that you need to have a public create ACL on sys_attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2024 02:58 AM
Hello Markus,
You've done an amazing job!
I installed the applications however I'm not able to make it work. When I attempt to add an attachment the browser console logs a "500 Internal Server Error" and the system logs show "Cannot convert null to an object. (sys_script_include.c265c47193f38250e02873718bba107c.script âžš âžš; line 35): com.glide.rest.domain.ServiceException: TypeError: Cannot convert null to an object. (sys_script_include.c265c47193f38250e02873718bba107c.script âžš âžš; line 35):"
I've tracked this down to the buffered stream returned by the StreamExt being null.
Could you please advise what I might be missing?
Thank you!