- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 07:47 AM
Hi,
I’ve created a custom table named u_cg_legal_request. In my Flow Designer flow, I’m using the ‘Get Attachments on Record’ action to retrieve attachments from records in this table. However, the action is consistently returning a count of 0 attachments, even though the record definitely has files attached.
This issue seems to happen only for this custom table. It works fine for standard tables like incident.
Is there something specific I need to configure for the custom table to make this action work? Any help or insights would be appreciated.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 12:13 AM
Hello @Anandini ,
File name Data type: String
Search string containing a partial or entire file name of an attachment file. You can use this input as a query filter to find one or more attachments that have the listed file name. If you leave this input empty, the action returns all attachments associated with the source record.
Here, Check weather the file exists or not with the name you are giving. I think there is no file exist with that name thats why It was returning as zero. If you want all the attachment to retrieve You have to left as empty.
You can refer this article: Get Attachments on Record Action
✅ If My suggestion helps to get out of this issue, please mark it as the answer and hit the thumbs-up to help others find it too!
Thanks & Regards,
Aditya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 08:15 AM
Is the ‘Get Attachments on Record’ scope safe? If your script is running in a scoped app and attempts to use a global object via GlideAggregate (e.g., referencing a table that only exists in global scope), ensure the table is actually accessible.
I think GlideAggregate will not return data unless explicitly permitted via cross-scope privileges.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 08:46 AM
hello @Joe Dames ,
I am using global scope only. I'm not using scoped application. Everything is in Global itself.. Here you can check that the table I'm running flow is in global.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 09:01 AM
that action seems to be a custom action as I am unable to find that in flow designer.
I could find only these ones
So please check the logic within that custom action and how it's getting the count.
Share the script and configuration.
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
05-05-2025 10:18 AM - edited 05-05-2025 10:32 AM