
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 02:08 AM
Is it possible to set a limit on the total combined filename character length of all added attachments? We want to prevent specific records saving attachments that will have more than a combines limit of 506 characters.
No limit on how many attachments but if attachments reach more than 506 characters then no more.
Solved! Go to Solution.
- Labels:
-
Content Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 02:16 AM
only way I could think of is Before insert BR on sys_attachment and check the count of characters
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var fileName = current.file_name.toString();
if(fileName.length > 10)
current.setAbortAction(true);
})(current, previous);
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 02:16 AM
only way I could think of is Before insert BR on sys_attachment and check the count of characters
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var fileName = current.file_name.toString();
if(fileName.length > 10)
current.setAbortAction(true);
})(current, previous);
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader