The CreatorCon Call for Content is officially open! Get started here.

To add client condition in attachment action by using javascript:

pratikshabh
Tera Contributor

I want to fetch attachment sys ids in a filter where action model field is used which attachmentSysId.Screenshot 2025-08-19 225306.png

 

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 

14 REPLIES 14

On what attachment table? Sys_attachment?

 

If that checkbox is true, you need to show a UI (?) action on the same table?

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

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!

pratikshabh
Tera Contributor

@Ankur Bawiskar Do you have any suggestions on this issue

Ankur Bawiskar
Tera Patron
Tera Patron

@pratikshabh 

what is your business requirement?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader