To add client condition in attachment action by using javascript:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 10:30 AM
I want to fetch attachment sys ids in a filter where action model field is used which attachmentSysId.
I have added condition like this but it is not showing attachment action on the form even if the attachments are getting added. I have tried the same code in attachment table by using sys is one of it is showing those sys_ids. Could you suggest something to add condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 12:07 PM
On what attachment table? Sys_attachment?
If that checkbox is true, you need to show a UI (?) action on the same table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 12:09 PM
Attachment actions are meant to be added when you see attachment in sidebar the ui action will be there if you click on three dots beside attachment name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 12:24 PM
Unfortunately I don't have any experience with action assignments. This wouldn't be a client-side action though, since you're checking the database (server) for a value. So at minimum, you'd need to shift the code to the script condition box.
Best of luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 06:01 AM
@Ankur Bawiskar Do you have any suggestions on this issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 06:10 AM
what is your business requirement?
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