<?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 VA conversational catalog items in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419716#M1236021</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to make one of record producer to conversational item and i have made it.&lt;/P&gt;&lt;P&gt;There is one error that we must not use DOM objects in client script to make conversational.&lt;/P&gt;&lt;P&gt;This is the client script we use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; onSubmit() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;//Type appropriate comment here, and begin script below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;((g_form.getValue(&lt;/SPAN&gt;&lt;SPAN&gt;'does_the_proposed_delegate_report_to_the_manager'&lt;/SPAN&gt;&lt;SPAN&gt;) == &lt;/SPAN&gt;&lt;SPAN&gt;'No'&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.document.getElementsByClassName(&lt;/SPAN&gt;&lt;SPAN&gt;'get-attachment'&lt;/SPAN&gt;&lt;SPAN&gt;).length == &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_form.addErrorMessage(getMessage(&lt;/SPAN&gt;&lt;SPAN&gt;'You must attach a confirmation message from your proposed delegates manager with this ticket before proceeding.'&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How we can modify so it supports VA.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Nov 2025 06:07:03 GMT</pubDate>
    <dc:creator>preethigovi</dc:creator>
    <dc:date>2025-11-05T06:07:03Z</dc:date>
    <item>
      <title>VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419716#M1236021</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to make one of record producer to conversational item and i have made it.&lt;/P&gt;&lt;P&gt;There is one error that we must not use DOM objects in client script to make conversational.&lt;/P&gt;&lt;P&gt;This is the client script we use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; onSubmit() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;//Type appropriate comment here, and begin script below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;((g_form.getValue(&lt;/SPAN&gt;&lt;SPAN&gt;'does_the_proposed_delegate_report_to_the_manager'&lt;/SPAN&gt;&lt;SPAN&gt;) == &lt;/SPAN&gt;&lt;SPAN&gt;'No'&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.document.getElementsByClassName(&lt;/SPAN&gt;&lt;SPAN&gt;'get-attachment'&lt;/SPAN&gt;&lt;SPAN&gt;).length == &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_form.addErrorMessage(getMessage(&lt;/SPAN&gt;&lt;SPAN&gt;'You must attach a confirmation message from your proposed delegates manager with this ticket before proceeding.'&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How we can modify so it supports VA.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 06:07:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419716#M1236021</guid>
      <dc:creator>preethigovi</dc:creator>
      <dc:date>2025-11-05T06:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419735#M1236024</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/791850"&gt;@preethigovi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please use script below and try.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function onSubmit() {

    var reportsToManager = g_form.getValue('does_the_proposed_delegate_report_to_the_manager');
    if (reportsToManager == 'No') {
        if (!g_form.hasAttachments()) {
    
            g_form.addErrorMessage(getMessage('You must attach a confirmation message from your proposed delegates manager with this ticket before proceeding.'));
            return false;
        }
    }

    // If the answer is 'Yes', or if it's 'No' and attachments DO exist, allow submission.
    return true;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 06:31:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419735#M1236024</guid>
      <dc:creator>Vishal_Jaiswal</dc:creator>
      <dc:date>2025-11-05T06:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419749#M1236025</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/791850"&gt;@preethigovi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where are you doing this validation? native or portal view?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 06:46:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419749#M1236025</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-11-05T06:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419751#M1236027</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/791850"&gt;@preethigovi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try with below script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function onSubmit() {
    var delegateReportsToManager = g_form.getValue('does_the_proposed_delegate_report_to_the_manager');
    var hasAttachment = g_form.hasAttachments(); 

    if (delegateReportsToManager == 'No' &amp;amp;&amp;amp; !hasAttachment) {
        g_form.addErrorMessage(getMessage('You must attach a confirmation message from your proposed delegates manager before proceeding.'));
        return false;
    }

    return true;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;g_form.hasAttachment()&lt;/STRONG&gt; will check for attachments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please mark my answer correct and helpful if this works for you&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sarthak&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 06:47:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419751#M1236027</guid>
      <dc:creator>Sarthak Kashyap</dc:creator>
      <dc:date>2025-11-05T06:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419772#M1236029</link>
      <description>&lt;P&gt;Even,&amp;nbsp;g_form.hasAttachments()&amp;nbsp;is not supported in VA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;, Validation done on portal.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 07:12:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419772#M1236029</guid>
      <dc:creator>preethigovi</dc:creator>
      <dc:date>2025-11-05T07:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419778#M1236032</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/791850"&gt;@preethigovi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;g_form.hasAttachments() doesn't work on portal, the script is wrongly shared&lt;/P&gt;
&lt;P&gt;see if this works for you and you are able to use VA Conversational for this item&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onSubmit() {
    //Type appropriate comment here, and begin script below
    if ((g_form.getValue('does_the_proposed_delegate_report_to_the_manager') == 'No') &amp;amp;&amp;amp; getRPAttachmentCount() == 0) {
        g_form.addErrorMessage(getMessage('You must attach a confirmation message from your proposed delegates manager with this ticket before proceeding.'));
        return false;
    }
}

function getRPAttachmentCount() {
    var length;
    try {
        length = angular.element("#sc_cat_item_producer").scope().attachments.length;
    } catch (e) {
        length = -1;
    }
    return length;
}&lt;/LI-CODE&gt;
&lt;P&gt;If not then you can't use this ITEM for Conversational VA&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; If my response helped, please mark it as correct &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; and close the thread &lt;span class="lia-unicode-emoji" title=":locked:"&gt;🔒&lt;/span&gt;— this helps future readers find the solution faster! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 07:20:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3419778#M1236032</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-11-05T07:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420732#M1236229</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="preethigovi_0-1762406795145.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480717iA6B0962BEF2B547E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="preethigovi_0-1762406795145.png" alt="preethigovi_0-1762406795145.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 05:26:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420732#M1236229</guid>
      <dc:creator>preethigovi</dc:creator>
      <dc:date>2025-11-06T05:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420735#M1236230</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="preethigovi_1-1762406909168.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480718iA38AC8F4FC0CF82E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="preethigovi_1-1762406909168.png" alt="preethigovi_1-1762406909168.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 05:28:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420735#M1236230</guid>
      <dc:creator>preethigovi</dc:creator>
      <dc:date>2025-11-06T05:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420744#M1236233</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This catalog client script is not VA supported due to the presence of the following variables in the script: g_form.hasAttachments.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 05:37:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420744#M1236233</guid>
      <dc:creator>preethigovi</dc:creator>
      <dc:date>2025-11-06T05:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: VA conversational catalog items</title>
      <link>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420763#M1236240</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/791850"&gt;@preethigovi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you are still getting the error and that catalog item cannot be used in Conversational VA then you cannot do anything here.&lt;/P&gt;
&lt;P&gt;It's OOTB platform limitation.&lt;/P&gt;
&lt;P&gt;see this&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/intelligence-ml-articles/now-assist-in-conversational-catalog-request-guidance-for-making/ta-p/2987560" target="_blank" rel="noopener"&gt;Now Assist in Conversational Catalog Request: Guidance for making catalog items conversational&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; If my response helped, please mark it as correct &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; and close the thread &lt;span class="lia-unicode-emoji" title=":locked:"&gt;🔒&lt;/span&gt;— this helps future readers find the solution faster! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 06:03:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/va-conversational-catalog-items/m-p/3420763#M1236240</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-11-06T06:03:25Z</dc:date>
    </item>
  </channel>
</rss>

