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
‎01-28-2022 12:55 AM
I dont think it makes a difference if it is CSM or not. The record producer should work in the same way. It might be due to your platform version (i think the code above works with quebec).
You can add a "debugger;" statement at different lines of the client controller. If you open the developer console on your browser and then upload, you will be able to debug the code very easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2022 03:58 AM
Where have you defined the functions:
getRecordTableName()
getRecordId()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 12:49 AM
The OOTB widget is being wrapped and i'm injecting the logic that is required to enable to "public" part. Both of the functions are defined in the child scope, see this line (afterwards i'm binding the child scope to the function call)
c.childScope.$watch('onAttachmentSelect', function(newValue, oldValue, scope) {
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 06:47 AM
Thank you for this. It is a brilliant solution to a frustrating problem.
However, I am still receiving an unspecified error on my field when I try to submit my form.
(Attach CV is the name of the Custom with Label variable)
There is nothing in the console and nothing relevant I can find in the debugger. The widget seems to do its job flawlessly right up until it's time to submit. I've tried making it non-mandatory in addition to other changes with no luck.
We are on Vancouver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 01:49 PM
Hello everyone. The widget @Krauzi posted here does work. You just have to save the widget in a scope and make the next change in "Client Controller":
You must initialize to false before the if.