Help with the Attachment component, please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I have a business requirement to display all attachments for a request and its related records in one location. To accomplish this, I want to take advantage of the Tab Sidebar and create a custom tab to display the attachments. The Tab Sidebar already has an option to display attachments for a specific record, but I need to display all attachments for the related records, not just a single record.
My first thought was to create my own preset and controller to get the data I need, but I've run into an issue with the Attachment component and I'm hoping someone can help me out.
I've created a page (it's in a page collection) and to compare, I've added the Attachment component with the preset and another one without the preset.
In the component without the preset, it still has Sys ID and Table in the configuration, but the Sys ID is grayed out and I can't bind it to anything.
Does anyone know why I can't bind data to the Sys ID? I planned on creating a controller to bring back a list of sys ids that I would bind.
I have an alternative solution, but I need help with it, too.
I'm able to create a related list that produces a list of attachments for all the related records, but if I click on one of them, I just get a row from the sys_attachment table and the attachment doesn't display. Does anyone know how to add an On Click event for a specific record in a related list? If I can do that, then I can open a modal with the attachment component and display the attachment using the presets.
If anyone has a better idea to accomplish the requirement, please let me know.
