when user attaches an attachment of size more than 10 mb, it should show an alert message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 11:28 PM
Hi Experts,
I have requirement as below
When user attaches an attachment of size more than 10 mb, it should show an alert message as Attachment size is exceeded, it should be on RITM or catalog task table.
I want to implement this through client script.
Thanks,
Likhitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 02:21 AM
Thank you for marking my response as helpful.
That's not possible using onChange catalog client script as in sys_attachment the sysId which gets linked with table_sys_id is dynamic
Why not use Attachment type variable and give max size attribute and create this variable for each of your items?
Something like this
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
04-13-2025 08:10 AM
Hope you are doing good.
Did my reply answer your question?
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
04-11-2025 12:31 AM
Hi @CT00782576
You can use below approach to show the alert message.
1.Create Before Business Rule on Attachment Table(sys_attachment) and add below condition.
When to run : Before
Filter condition : Table name is sc_req_item
2. In Advance tab, Glide the RITM table .
So, once you added above condition and script, it will show the pop-up whenever you are adding attachment with file size more than 10 MB.
If my response helped please mark it correct and helpful . Happy Learning!
Anvesh