<?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: UI action configuration on SOW view in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3604006#M1264355</link>
    <description>&lt;P&gt;Sorry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My bad.&lt;/P&gt;&lt;P&gt;It's one of the silliest thing one could do. I made a typo in the group sys id which broke the code. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2026 07:15:51 GMT</pubDate>
    <dc:creator>AkshitG90438384</dc:creator>
    <dc:date>2026-09-30T07:15:51Z</dc:date>
    <item>
      <title>UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603984#M1264349</link>
      <description>&lt;P&gt;Hi Fellas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you all are doing well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am recently stuck with a requirement and would love some insights, solutions on it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are UI actions on Change Request that are Close or Request Approval. Requirement was to make those button disabled if the assignment group is SAP and the logged in user is not Angela.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the logged in user is Angela and assignment group is SAP so she can access those UI actions to change the states of the Change Request.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was easy to configure UI actions for native view but when it comes to SOW view (I am finding hard time)&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will attach screenshots and scripts for the reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-09-30 114242.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/531175i93ED7BD31C6A6208/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" srcset="/community/image/serverpage/image-id/531175i93ED7BD31C6A6208/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999 1.0x" role="button" title="Screenshot 2026-09-30 114242.png" alt="Screenshot 2026-09-30 114242.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-09-30 114202.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/531173i348A58D97D37167F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" srcset="/community/image/serverpage/image-id/531173i348A58D97D37167F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999 1.0x" role="button" title="Screenshot 2026-09-30 114202.png" alt="Screenshot 2026-09-30 114202.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-09-30 114110.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/531174iD3C0E87057B1E4DB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" srcset="/community/image/serverpage/image-id/531174iD3C0E87057B1E4DB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999 1.0x" role="button" title="Screenshot 2026-09-30 114110.png" alt="Screenshot 2026-09-30 114110.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;The scripts Im using for Close UI action is&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function moveToClosed() {
    if (g_user.hasRole('admin')) {
        g_form.setValue("state", "3");
        gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_closed");
        return;
    }
    if (g_form.getValue('assignment_group') == 'a7c1b92e1bab3110ad0a20a2b24bcb47') {
        if (g_user.userID != '46776fc81b5c4210ad0a20a2b24bcb35') {
            return false;
        }
    }
    g_form.setValue("state", "3");
    gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_closed");

}

if (typeof window == 'undefined')
    setRedirect();

function setRedirect() {
    current.update();
    action.setRedirectURL(current);
}

addLoadEvent(function() {
    if (g_user.hasRole('admin')) {
        return;
    }

    if (g_form.getValue('assignment_group') == 'a7c1b92e1bab3110ad0a20a2b24bcb47') {
        if (g_user.userID != '46776fc81b5c4210ad0a20a2b24bcb35') {
            var button = document.getElementById('state_model_move_to_closed');
            if (button) {
                button.disabled = true;
				button.style.backgroundColor = '#d3d3d3';
				button.style.color = '#666666';
				button.style.borderColor = '#b5b5b5';
                button.style.cursor = 'not-allowed';
            }
        }
    }
});&lt;/LI-CODE&gt;&lt;P&gt;For request approval 1&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function moveToAssess() {
    if (g_user.hasRole('admin')) {
        g_form.setValue("state", "-4");
        gsftSubmit(null, g_form.getFormElement(), 'state_model_request_assess_approval');
        return;
    }
    if (g_form.getValue('assignment_group') == 'a7c1b92e1bab3110ad0a20a2b24bcb47') {
        if (g_user.userID != '46776fc81b5c4210ad0a20a2b24bcb35') {
            return false;
        }
    }
	
    g_form.setValue("state", "-4");
    gsftSubmit(null, g_form.getFormElement(), 'state_model_request_assess_approval');
}

if (typeof window == 'undefined')
    updateAndRedirect();

function updateAndRedirect() {
    current.update();
    action.setRedirectURL(current);
}

addLoadEvent(function() {
    if (g_user.hasRole('admin')) {
        return;
    }

    if (g_form.getValue('assignment_group') == 'a7c1b92e1bab3110ad0a20a2b24bcb47') {
        if (g_user.userID != '46776fc81b5c4210ad0a20a2b24bcb35') {
            var button = document.getElementById('state_model_request_assess_approval');
            if (button) {
                button.disabled = true;
				button.style.backgroundColor = '#d3d3d3';
				button.style.color = '#666666';
				button.style.borderColor = '#b5b5b5';
                button.style.cursor = 'not-allowed';
            }
        }
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For request approval 2&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function moveToAuthorize() {
    if (g_user.hasRole('admin')) {
        g_form.setValue("state", "-3");
        gsftSubmit(null, g_form.getFormElement(), 'state_model_request_cab_approval');
        return;
    }
    if (g_form.getValue('assignment_group') == 'a7c1b92e1bab3110ad0a20a2b24bcb47') {
        if (g_user.userID != '46776fc81b5c4210ad0a20a2b24bcb35') {    
            return false;
        }
    }
    g_form.setValue("state", "-3");
    gsftSubmit(null, g_form.getFormElement(), 'state_model_request_cab_approval');
}

if (typeof window == 'undefined')
    updateAndRedirect();

function updateAndRedirect() {
    current.update();
    action.setRedirectURL(current);
}

addLoadEvent(function() {
    if (g_user.hasRole('admin')) {
        return;
    }

    if (g_form.getValue('assignment_group') == 'a7c1b92e1bab3110ad0a20a2b24bcb47') {
        if (g_user.userID != '46776fc81b5c4210ad0a20a2b24bcb35') {
            var button = document.getElementById('state_model_request_cab_approval');
            if (button) {
                button.disabled = true;
				button.style.backgroundColor = '#d3d3d3';
				button.style.color = '#666666';
				button.style.borderColor = '#b5b5b5';
                button.style.cursor = 'not-allowed';
            }
        }
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-AK&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 06:18:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603984#M1264349</guid>
      <dc:creator>AkshitG90438384</dc:creator>
      <dc:date>2026-09-30T06:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603987#M1264350</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1193375"&gt;@AkshitG90438384&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so what's not working?&lt;/P&gt;
&lt;P&gt;what debugging did you do?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 06:24:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603987#M1264350</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2026-09-30T06:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603991#M1264351</link>
      <description>&lt;P&gt;Things are working as expected on Native view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Buttons are visible on the SOW view but they are not responsive. Nothing happens when I click on it. It just loads for a while.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 06:42:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603991#M1264351</guid>
      <dc:creator>AkshitG90438384</dc:creator>
      <dc:date>2026-09-30T06:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603996#M1264352</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1193375"&gt;@AkshitG90438384&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please explain why&amp;nbsp; &lt;STRONG&gt;“Close”&lt;/STRONG&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;STRONG&gt;“Request Approval” is not required for your SAP&amp;nbsp; business&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For a &lt;/SPAN&gt;&lt;STRONG&gt;Change Request&lt;/STRONG&gt;&lt;SPAN&gt; in ServiceNow, the&lt;/SPAN&gt; &lt;STRONG&gt;“Close”&lt;/STRONG&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;STRONG&gt;“Request Approval”&lt;/STRONG&gt;&lt;SPAN&gt; UI actions are&lt;/SPAN&gt;&lt;SPAN&gt; typically required to&lt;/SPAN&gt;&lt;SPAN&gt; control the change&lt;/SPAN&gt;&lt;SPAN&gt; lifecycle and ensure&lt;/SPAN&gt;&lt;SPAN&gt; proper governance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does it mean for&amp;nbsp; "assignment group is SAP and the logged in user is not Angela" - OOB governance set up not needed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Also plz&amp;nbsp; check this KB for troubleshooting the issue :&amp;nbsp;&lt;A href="https://support.servicenow.com/kb?id=kb_article_view&amp;amp;sysparm_article=KB1811593" target="_blank" rel="noopener"&gt;https://support.servicenow.com/kb?id=kb_article_view&amp;amp;sysparm_article=KB1811593&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 06:50:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603996#M1264352</guid>
      <dc:creator>Tanushree Maiti</dc:creator>
      <dc:date>2026-09-30T06:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603998#M1264353</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1193375"&gt;@AkshitG90438384&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for script to run in workspace you need to write logic in workspace client script&lt;/P&gt;
&lt;P&gt;did you add that?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 06:54:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3603998#M1264353</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2026-09-30T06:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3604000#M1264354</link>
      <description>&lt;P&gt;Hi Tanushree,&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Angela is part of the SAP group. She noticed that other team members were closing changes or requesting approvals without properly reviewing them.&lt;/P&gt;&lt;P&gt;As a result, she introduced a requirement that only she can request approvals or close the change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So whenever a change is created for SAP group. Only she can request approvals or close the changes. For other teams members the button must look disabled.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 06:54:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3604000#M1264354</guid>
      <dc:creator>AkshitG90438384</dc:creator>
      <dc:date>2026-09-30T06:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: UI action configuration on SOW view</title>
      <link>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3604006#M1264355</link>
      <description>&lt;P&gt;Sorry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My bad.&lt;/P&gt;&lt;P&gt;It's one of the silliest thing one could do. I made a typo in the group sys id which broke the code. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 07:15:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/ui-action-configuration-on-sow-view/m-p/3604006#M1264355</guid>
      <dc:creator>AkshitG90438384</dc:creator>
      <dc:date>2026-09-30T07:15:51Z</dc:date>
    </item>
  </channel>
</rss>

