- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi This is Rajkumar
am trying to build an application for that i have create a custom portal that user can access and raise a request from the record producer, when adding an attachment in attachment field its not getting saved into that variable and displaying empty.
Please go through the images
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
since it's for external user, I believe it's access issue.
try creating Table.None CREATE ACL on sys_attachment and add snc_external role to it and test
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Ankur Bawiskar
No am not using catalog item page directly,
its scoped application with snc_external role, for login page am using external user registration process for user to register in to the portal
And am using custom widgets, which directs to a catalog type TOPIC that i have created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
since it's for external user, I believe it's access issue.
try creating Table.None CREATE ACL on sys_attachment and add snc_external role to it and test
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for the input, I have create a ACL with snc_external role and still it is not working on the portal
its working on PDI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Ankur Bawiskar
Thanks for the input, I have create a ACL with snc_external role and still it is not working on the portal
its working on PDI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rajkumar Bommal ,
I have implemented this in the past:
1. Map Variable to a File Attachment Field
Create a file attachment field (type Attachment) on your target table.
Map your record producer’s attachment variable to this field via the variable setup.
2. Use a Record Producer Script to Handle Attachments Manually
If mapping alone isn’t sufficient (e.g custom logic or routing is required), you can add a script in the Record Producer Script section to move the attachments...
var gr = new GlideRecord('sys_attachment');
if (gr.get(producer.attachment_variable_name)) {
gr.table_name = current.getTableName(); //
gr.table_sys_id = current.sys_id;
gr.update(); // Update the attachment to associate with the new record
}
Important note: Use gr.update() to reassign the existing attachment rather than gr.insert(), which creates a duplicate....
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/