<?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 Re: Making an attachment mandatory in a catalog task in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443995#M100921</link>
    <description>&lt;P&gt;Have you check ed applies on catalog tasks??&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;0r share your full client script screenshot&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Mar 2017 20:12:19 GMT</pubDate>
    <dc:creator>nayanawadhiya1</dc:creator>
    <dc:date>2017-03-02T20:12:19Z</dc:date>
    <item>
      <title>Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443985#M100911</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in a catalog item I created there are attachments that need to be mandatory based on the catalog tasks in the workflow. In the request the first catalog client script works correctly, but the other ones I created for the catalog tasks don't show and instead shows the initial attachment. It basically asks to attach the same attachment over and over again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can make it mandatory only on specific catalog tasks. I already tried checkmarking "Apples on Catalog Tasks" and that didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have for the one that does work but keeps showing repeatedly: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159954iDF20CE0D12A5EC1E/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 18:13:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443985#M100911</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T18:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443986#M100912</link>
      <description>&lt;P&gt;Hello Grace,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;This is a pretty good post about it, maybe it can be what you're looking for.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://sncommander.com/how-to-make-service-catalog-attachments-mandatory-in-servicenow/" title="http://sncommander.com/how-to-make-service-catalog-attachments-mandatory-in-servicenow/"&gt;How to Make Service Catalog Attachments Mandatory in ServiceNow | SN Commander&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Hope it's useful&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 18:18:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443986#M100912</guid>
      <dc:creator>AnotherNOWDev</dc:creator>
      <dc:date>2017-03-02T18:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443987#M100913</link>
      <description>&lt;P&gt;Hey Grace,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Try this - &lt;/P&gt;&lt;BR /&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; list-style-position: initial; list-style-image: initial; color: #5c5c5c; margin-bottom: 1px !important; margin-left: 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; sys_id = gel(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'sys_uniqueValue'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;).value; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; attachment = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; GlideRecord(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'sys_attachment'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;attachment.addQuery(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'table_name','sc_task'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;); &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;attachment.addQuery(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'table_sys_id'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;,sys_id); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;attachment.query(); &amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; (!attachment.next()) { &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert (&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'Attach an attachment.'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;}&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 02 Mar 2017 18:28:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443987#M100913</guid>
      <dc:creator>nayanawadhiya1</dc:creator>
      <dc:date>2017-03-02T18:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443988#M100914</link>
      <description>&lt;P&gt;Nayan,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Do I need to replace some of the values to my own? If so which ones?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:13:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443988#M100914</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T19:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443989#M100915</link>
      <description>&lt;P&gt;no need to change anything!!!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:16:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443989#M100915</guid>
      <dc:creator>nayanawadhiya1</dc:creator>
      <dc:date>2017-03-02T19:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443990#M100916</link>
      <description>&lt;P&gt;It didn't work. Do you think its because I'm not specifying a value? Since I'm trying to trigger it in a catalog task it needs something to tell it when right?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Also, for "Type" I took off the onSubmit and put None instead, don't know if that makes a difference.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Grace&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:31:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443990#M100916</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T19:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443991#M100917</link>
      <description>&lt;P&gt;write "return false;" after alert(); And Client script should "onSubmit" Client script&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:42:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443991#M100917</guid>
      <dc:creator>nayanawadhiya1</dc:creator>
      <dc:date>2017-03-02T19:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443992#M100918</link>
      <description>&lt;P&gt;It says syntax is OK but there is an error saying invalid return. I also added onSubmit&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is what it looks like:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159934iDEF57247F9DC2E4C/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:52:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443992#M100918</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T19:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443993#M100919</link>
      <description>&lt;P&gt;you haven't write the code in between function -&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;function onSubmit(){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;//here paste the code&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:57:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443993#M100919</guid>
      <dc:creator>nayanawadhiya1</dc:creator>
      <dc:date>2017-03-02T19:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443994#M100920</link>
      <description>&lt;P&gt;I noticed that right after I had replied. I added it and tested and still doesn't ask for an attachment.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 20:04:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443994#M100920</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T20:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443995#M100921</link>
      <description>&lt;P&gt;Have you check ed applies on catalog tasks??&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;0r share your full client script screenshot&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 20:12:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443995#M100921</guid>
      <dc:creator>nayanawadhiya1</dc:creator>
      <dc:date>2017-03-02T20:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443996#M100922</link>
      <description>&lt;P&gt;Instead of:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;attachment.addQuery(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; font-size: 9pt !important;"&gt;'table_sys_id'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; font-size: 9pt !important;"&gt;,'sys_id'); &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; font-size: 9pt !important;"&gt;could you please try with:&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; font-size: 9pt !important;"&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;attachment.addQuery(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; font-size: 9pt !important;"&gt;'table_sys_id'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; font-size: 9pt !important;"&gt;,sys_id); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif; font-style: inherit;"&gt;Also, please check this thread: &lt;A title="Catalog service making Mandatory Attachment both application and SP" __default_attr="231480" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="Catalog service making Mandatory Attachment both application and SP" data-renderedposition="166_219.125_461_14" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=b571cb29db98dbc01dcaf3231f9619d8"&gt;Catalog service making Mandatory Attachment both application and SP&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 20:34:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443996#M100922</guid>
      <dc:creator>rafael_merces2</dc:creator>
      <dc:date>2017-03-02T20:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443997#M100923</link>
      <description>&lt;P&gt;Yes I checked mark that. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is the full screenshot:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159938i410CC892608A4640/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 21:36:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443997#M100923</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T21:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443998#M100924</link>
      <description>&lt;P&gt;Hi Rafael,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I tried it and it didn't make a difference. Should I be including a script in the catalog task as well?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Grace&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 21:37:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443998#M100924</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-02T21:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443999#M100925</link>
      <description>&lt;P&gt;we use following script&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;function onSubmit() {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; try { //Works in non-portal ui&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; var attachments = document.getElementById('header_attachment_list_label');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; if (attachments.style.visibility == 'hidden' || attachments.style.display == 'none' ) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; alert("Please be sure to attach all required documentation prior to submitting your request");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; return false;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;} catch(e) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; if ((this.document.getElementsByClassName('get-attachment').length == 0)) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; alert('Please add the required attachment before submitting this request.');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; return false;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:51:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1443999#M100925</guid>
      <dc:creator>Vladi1</dc:creator>
      <dc:date>2017-03-02T22:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444000#M100926</link>
      <description>&lt;P&gt;Hi Vladimir,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you but I tried it and it didn't make the attachment mandatory.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;-Grace&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Mar 2017 00:27:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444000#M100926</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-03T00:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444001#M100927</link>
      <description>&lt;P&gt;Hi Grace,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;An update on my existing post, you can use &lt;STRONG&gt;Glide Aggregate&lt;/STRONG&gt; on Server side which is a Best Practice for better System Performance rather than using Glide Record on Client Side. Write an &lt;STRONG&gt;Before Insert/Update Business Rule on Catalog Task&lt;/STRONG&gt; Table as below:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;Condition&lt;/STRONG&gt;: You can specify the Catalog Item for which you want to configure this validation by dot walking as mentioned below:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159952i929EA8386AFA49F4/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Select "S&lt;STRONG&gt;how Related Fields&lt;/STRONG&gt;" option from the filter condition first and then dot walking as "&lt;STRONG&gt;Request Item--&amp;gt;Requested Item fields&lt;/STRONG&gt;"&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159944iC6DCE98BDFF9E20A/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Post which you can select the field as "&lt;STRONG&gt;item" is "Your Item Name&lt;/STRONG&gt;" as shown below:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159942iDB1DEF4FE7881816/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;(function executeRule(current, previous /*null when async*/) {&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; var att = new GlideAggregate('sys_attachment');&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; att.addAggregate('COUNT');&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; att.addQuery('table_name', current.getTableName());&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; att.addQuery('table_sys_id', current.sys_id);&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; att.query();&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; var count = 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; if (att.next()) {&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; count = att.getAggregate('COUNT');&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; if (count&amp;lt;1) {&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; gs.addInfoMessage("Please attach Attachment");&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; current.setAbortAction(true);&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;})(current, previous);&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159948i149BFDA80B3A6E65/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159946i6FACEF6D61D38D49/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;EM style="line-height: 1.5;"&gt;&lt;STRONG&gt;Hope this helps.Mark the answer as correct/helpful based on impact.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Shloke&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Mar 2017 05:11:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444001#M100927</guid>
      <dc:creator>shloke04</dc:creator>
      <dc:date>2017-03-03T05:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444002#M100928</link>
      <description>&lt;P&gt;This worked, thank you! &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" data-renderedposition="8_163_16_16" src="https://www.servicenow.com/8.0.4.21bdc7e/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Mar 2017 18:15:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444002#M100928</guid>
      <dc:creator>gnunez</dc:creator>
      <dc:date>2017-03-06T18:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444003#M100929</link>
      <description>&lt;P&gt;This is fine but even though it doesn't let the user insert a record without attachment. It still occupies the next number sequence on the table. for example in your example SCTASK000 number is taken even though record was rejected&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 23:54:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444003#M100929</guid>
      <dc:creator>manibaig</dc:creator>
      <dc:date>2020-01-15T23:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Making an attachment mandatory in a catalog task</title>
      <link>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444004#M100930</link>
      <description>&lt;P&gt;I'm getting an invalid update error ....&amp;nbsp;Match not found, reset to original&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 16:15:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/making-an-attachment-mandatory-in-a-catalog-task/m-p/1444004#M100930</guid>
      <dc:creator>John H1</dc:creator>
      <dc:date>2021-09-14T16:15:18Z</dc:date>
    </item>
  </channel>
</rss>

