Rejecting Attachments based on certain characters in file name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2024 04:08 PM
Does ServiceNow provide any features that can auto reject attachments based on their filename?
Example: Auto reject if the following occurs:
- Do not include spaces or special characters, except for hyphens (-) and underscores (_).
- Any files not adhering to these criteria should be automatically rejected by the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2024 05:05 AM
Any solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2024 06:07 AM
Hi @rajesh103
There is no OOB functionality provided to restrict attachments based on name, there is a property available to restrict based on file extension.
You could write a before insert business rule on sys_attachment table and abort the action if validation on the name fails. But, the error message may not be visible immediately as this BR runs on a different table. If you want to apply this validation on service portal, then you can either customize the widget or write an on-submit client script to check the file name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2024 07:30 AM
Thanks for the quick response, I'm facing a issue with when customer reply to the servicenow email with the attachment, the attachments are not flowing into the record. But I can see the attachment in the sys_email table (email logs). In action field on the attachment it is showing as none, it is not attaching the attachment to the target record. And this is happening to few records only. I wonder what functionality is stoping the attachments to the records. Please let me know if you have any idea.