<?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 Why is the code not being loaded and reflected? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3360590#M1224067</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;When creating a button to change items within the form using a UI Action, the following code was loaded on the Now Platform. However, it does not load on the Service Operation Workspace. How can it be loaded?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; onClick(g_form) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.u_state = &lt;/SPAN&gt;&lt;SPAN&gt;'review'&lt;/SPAN&gt;&lt;SPAN&gt;; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;//set state to Published when button is clicked&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; action.setRedirectURL(current);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.setWorkflow(&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; current.update();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.setWorkflow(&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 25 Aug 2025 01:36:02 GMT</pubDate>
    <dc:creator>t-takumi</dc:creator>
    <dc:date>2025-08-25T01:36:02Z</dc:date>
    <item>
      <title>Why is the code not being loaded and reflected?</title>
      <link>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3360590#M1224067</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;When creating a button to change items within the form using a UI Action, the following code was loaded on the Now Platform. However, it does not load on the Service Operation Workspace. How can it be loaded?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; onClick(g_form) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.u_state = &lt;/SPAN&gt;&lt;SPAN&gt;'review'&lt;/SPAN&gt;&lt;SPAN&gt;; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;//set state to Published when button is clicked&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; action.setRedirectURL(current);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.setWorkflow(&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; current.update();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; current.setWorkflow(&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Aug 2025 01:36:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3360590#M1224067</guid>
      <dc:creator>t-takumi</dc:creator>
      <dc:date>2025-08-25T01:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the code not being loaded and reflected?</title>
      <link>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3361360#M1224235</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/951103"&gt;@t-takumi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what do you mean isn't loaded?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it's a onLoad client script, you can add &lt;STRONG&gt;"g_form.addInfoMessage('This script is executed);&lt;/STRONG&gt;" to its start and then go to SOW and you'll see whether it's loaded or not... then you can continue but first let's find out if it is triggered or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know the result&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 14:36:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3361360#M1224235</guid>
      <dc:creator>GlideFather</dc:creator>
      <dc:date>2025-08-25T14:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the code not being loaded and reflected?</title>
      <link>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3361363#M1224236</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/951103"&gt;@t-takumi&lt;/a&gt;&amp;nbsp;sorry after my second read I noticed that you mentioned UI Action, &amp;nbsp;not client script...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you please share it with us? if it's UI Action, scroll down there are buttons "Format for Workspace" and "Workspace form" that might require checking them true:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlideFather_0-1756132719274.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/465234iB18E791C08A29C9C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GlideFather_0-1756132719274.png" alt="GlideFather_0-1756132719274.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eventually create a new declarative action.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 14:38:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3361363#M1224236</guid>
      <dc:creator>GlideFather</dc:creator>
      <dc:date>2025-08-25T14:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the code not being loaded and reflected?</title>
      <link>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3367290#M1225412</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/951103"&gt;@t-takumi&lt;/a&gt;&amp;nbsp;any progress?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 13:22:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/why-is-the-code-not-being-loaded-and-reflected/m-p/3367290#M1225412</guid>
      <dc:creator>GlideFather</dc:creator>
      <dc:date>2025-09-01T13:22:02Z</dc:date>
    </item>
  </channel>
</rss>

