attachment limit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2017 05:13 AM
Hi,
I have been facing one issue in my SNOW PROD instance. When loading a particular incident ticket, SNOW instance becomes slow and even crashes.
When I tried opening the form through Chrome (it was also slow), I could know that the attachments in the ticket is about 226.
When I checked the attachments, 224 are winmail.dat and only 2 valid attachments.
How do I delete all the attachments in that ticket? Selecting each one and removing is not a feasible option as the instance crashes even before doing so.
Please help!!
Thanks,
Gopi
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2017 10:37 AM
Hello,
i am not aware of a system property that would do that for you. You can however, write a script to restrict total size. You can create a business rule before insert in sys_attachment table that checks the cumulative size of all attachments for a particular record. So lets say you are limiting size on the incident table. Something like:
var grInc = new GlideRecord('sys_attachment);
grInc.addQuery('table_name',"incident");
grInc.addQuery('table_sys_id',current.sys_id);
grInc.Query();
var totalSize=0;
while(grInc.next()) {
totalSize+= parseInt(grInc.size_bytes);
}
if(totalSize+parseInt(current.size_bytes) > <your Size Limit>) {
gs.addInfoMessage("Attachment size exceeded");
current.setAbortAction(true);
}
Thanks,
aditya Telidevara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2017 11:25 PM
Hi Gopal,
You can specify the maximum size limit of the attachment can be attached in the ticket by using this property.
com.glide.attachment.max_size-->
Maximum file attachment size in megabytes:
Mark Correct /Helpful /Like based on the effect of response.
Regards
Sakshi