<?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 Display dialog box with 'Yes' and 'No' option using onSubmit Client Script in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077888#M1154030</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I need to create a dialog box to show some text with 'Yes' and 'No' as the button for the user to choose. If user selects 'Yes" need to update a Boolean field as true and if 'No' then update same Boolean field as false, I need to do this using&amp;nbsp;&lt;STRONG&gt;onSubmit Client Script&lt;/STRONG&gt;. Please help with the working example!&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2024 18:41:48 GMT</pubDate>
    <dc:creator>Rush B</dc:creator>
    <dc:date>2024-10-18T18:41:48Z</dc:date>
    <item>
      <title>Display dialog box with 'Yes' and 'No' option using onSubmit Client Script</title>
      <link>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077888#M1154030</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I need to create a dialog box to show some text with 'Yes' and 'No' as the button for the user to choose. If user selects 'Yes" need to update a Boolean field as true and if 'No' then update same Boolean field as false, I need to do this using&amp;nbsp;&lt;STRONG&gt;onSubmit Client Script&lt;/STRONG&gt;. Please help with the working example!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 18:41:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077888#M1154030</guid>
      <dc:creator>Rush B</dc:creator>
      <dc:date>2024-10-18T18:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Display dialog box with 'Yes' and 'No' option using onSubmit Client Script</title>
      <link>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077891#M1154031</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/179958"&gt;@Rush B&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;It's pretty straight forward! Have you tried anything so far?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 18:50:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077891#M1154031</guid>
      <dc:creator>Murthy Ch</dc:creator>
      <dc:date>2024-10-18T18:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display dialog box with 'Yes' and 'No' option using onSubmit Client Script</title>
      <link>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077896#M1154032</link>
      <description>&lt;P&gt;GlideModal approach ? if yes pls help with the provide sample code, check the screenshot once I need to show like that.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 19:02:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3077896#M1154032</guid>
      <dc:creator>Rush B</dc:creator>
      <dc:date>2024-10-18T19:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Display dialog box with 'Yes' and 'No' option using onSubmit Client Script</title>
      <link>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3078161#M1154107</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/179958"&gt;@Rush B&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For GlideModal approach you can try the below one:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onSubmit() {
    //Type appropriate comment here, and begin script below
    if (g_scratchpad.userConfirmed) {
        return true;
    }
    var knowledgeTrue = function() {
        g_scratchpad.userConfirmed = true;
        g_form.setValue("knowledge", true);
        g_form.submit();
    };

    var knowledgeFalse = function() {
        g_scratchpad.userConfirmed = true;
        g_form.setValue("knowledge", false);
        g_form.submit();
    };
    var glideDialogClass = typeof GlideModal != 'undefined' ? GlideModal : GlideDialogWindow;
    var gModal = new glideDialogClass("glide_ask_standard");
    gModal.setTitle("Are you want to create article upon closure?");
    gModal.setPreference("title", "Article creation");
    gModal.setPreference("onPromptComplete", knowledgeTrue);
    gModal.setPreference("onPromptCancel", knowledgeFalse);
    gModal.render();

    return false;
}&lt;/LI-CODE&gt;
&lt;P&gt;(=tested)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2024 00:36:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3078161#M1154107</guid>
      <dc:creator>Murthy Ch</dc:creator>
      <dc:date>2024-10-20T00:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Display dialog box with 'Yes' and 'No' option using onSubmit Client Script</title>
      <link>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3078164#M1154108</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/179958"&gt;@Rush B&lt;/a&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlideModalTask.gif" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/395991i4B59DD3C3527CB2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="GlideModalTask.gif" alt="GlideModalTask.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2024 00:45:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/display-dialog-box-with-yes-and-no-option-using-onsubmit-client/m-p/3078164#M1154108</guid>
      <dc:creator>Murthy Ch</dc:creator>
      <dc:date>2024-10-20T00:45:32Z</dc:date>
    </item>
  </channel>
</rss>

