<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to set 1Mb for picture attachment in a form level in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/how-to-set-1mb-for-picture-attachment-in-a-form-level/m-p/2911753#M38</link>
    <description>&lt;P&gt;How to set 1Mb for picture attachment in a form level&lt;/P&gt;</description>
    <pubDate>Sat, 27 Apr 2024 05:01:45 GMT</pubDate>
    <dc:creator>krishna svg</dc:creator>
    <dc:date>2024-04-27T05:01:45Z</dc:date>
    <item>
      <title>How to set 1Mb for picture attachment in a form level</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-set-1mb-for-picture-attachment-in-a-form-level/m-p/2911753#M38</link>
      <description>&lt;P&gt;How to set 1Mb for picture attachment in a form level&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 05:01:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-set-1mb-for-picture-attachment-in-a-form-level/m-p/2911753#M38</guid>
      <dc:creator>krishna svg</dc:creator>
      <dc:date>2024-04-27T05:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to set 1Mb for picture attachment in a form level</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-set-1mb-for-picture-attachment-in-a-form-level/m-p/2911806#M41</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/365750"&gt;@krishna svg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;If you want to do it globally use this KB article and modify the system property and set the size you want:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.servicenow.com/kb?id=kb_article_view&amp;amp;sysparm_article=KB0718101" target="_blank" rel="noopener"&gt;https://support.servicenow.com/kb?id=kb_article_view&amp;amp;sysparm_article=KB0718101&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to do it to only on a particular table/form and particular type of attachment format write a before insert BR on sys_attachment table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var grInc = new GlideRecord('sys_attachment');
grInc.addQuery('table_name',"incident");//change table name according to your requirement
grInc.addQuery('table_sys_id',current.sys_id);
grInc.Query();
var totalSize=0;
 while(grInc.next()) {
      totalSize+= parseInt(grInc.size_bytes);
}
if(totalSize &amp;gt; 1) {
        gs.addInfoMessage("Attachment size exceeded");
        current.setAbortAction(true);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code is not tested.Please use log messages to and correct your code accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please mark my answer helpful/correct if it resolved your query&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 07:58:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-set-1mb-for-picture-attachment-in-a-form-level/m-p/2911806#M41</guid>
      <dc:creator>Ramz</dc:creator>
      <dc:date>2024-04-27T07:58:16Z</dc:date>
    </item>
  </channel>
</rss>

