Getting attachment id in attachment action client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 07:55 AM
Hi everybody,
I have been struggling with an issue that is driving me crazy. Our customers want attachments to be opened in a new browser tab by default when they are being clicked on in a case / task record in CSM/FSM workspace. By default the document viewer shows up, overlapping the whole screen.
This does not seem to be possible.
Now since Vancouver, there is the option to define attachment actions (All > Workspace Experience > Actions & Components > Attachment Actions).
I have been trying to define an action that can be selected via the attachment context menu that helps agents open the attachment in a new tab:
Creating an action is easy. However, I do not get a hold on the attachment's sys_id in the client script. The predefined script provides nothing but the empty click event listener but no hints on available objects:
function onClick() {
}
If I had the attachment's sys_id I could do something such as
top.window.open("<instance_name>/sys_attachment.do?sys_id=<attachment_sys_id>" target="_blank")
Any ideas?
Thank you very much for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 06:13 AM
Hi @Sebastian Kring , did you get any solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 07:26 AM
Hi mohit_ra,
unfortunately not yet. I will keep this post updated as soon as we find a solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 01:46 AM - edited 03-04-2025 01:47 AM
@Sebastian Kring @mohit_ra Did you find a solution to this? I have the same requirment, but can't seem to pull the sys_id in any way
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 01:19 AM
Hi Benjamin,
unfortunately not. I ended up with the workaround to add a ui action which opens all attachments of certain file types in new tabs.