<?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: Need help with Incident Management business rule script (Beginner) in Cloud Cost Management forum</title>
    <link>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328820#M1396</link>
    <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/940835"&gt;@DaramK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;no scripting required.&lt;/P&gt;
&lt;P&gt;you can use before insert/update business rule&lt;/P&gt;
&lt;P&gt;Condition: Category == Hardware&lt;/P&gt;
&lt;P&gt;Use Set Field Values Tab and set the group&lt;/P&gt;
&lt;P&gt;Something like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_0-1753098081628.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/457331iBAF609AF98AF895D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_0-1753098081628.png" alt="AnkurBawiskar_0-1753098081628.png" /&gt;&lt;/span&gt;&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="AnkurBawiskar_1-1753098093267.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/457332iF72687A398851676/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_1-1753098093267.png" alt="AnkurBawiskar_1-1753098093267.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;In your above script set the group sysId&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;if (current.category == "hardware") {
current.assignment_group = "groupSysId";
}
&lt;/LI-CODE&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 11:41:36 GMT</pubDate>
    <dc:creator>Ankur Bawiskar</dc:creator>
    <dc:date>2025-07-21T11:41:36Z</dc:date>
    <item>
      <title>Need help with Incident Management business rule script (Beginner)</title>
      <link>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328752#M1394</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;I'm a beginner in ServiceNow development, currently learning the Incident Management module.&lt;/P&gt;&lt;P&gt;I would like to create a 'business rule' that automatically sets the 'Assignment Group' when the 'Category'is "Hardware".&lt;/P&gt;&lt;P&gt;Here’s what I’ve tried so far:&lt;/P&gt;&lt;P&gt;```javascript&lt;BR /&gt;if (current.category == "hardware") {&lt;BR /&gt;current.assignment_group = "Hardware Support";&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 11:12:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328752#M1394</guid>
      <dc:creator>DaramK</dc:creator>
      <dc:date>2025-07-21T11:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Incident Management business rule script (Beginner)</title>
      <link>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328818#M1395</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/940835"&gt;@DaramK&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script is not required for this however as you are new you need to know fe things. As "assignment_group" is a reference field you need to pass the "sys_id" of the assignmnet group. So, as Servicenow best practice we will not hardcode any sys_id in a code. So you need to store the sys_id of the group in a system property and call it in a business rule. Below are the steps to do it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Open the required group record &amp;gt; right click on top of the headermenu &amp;gt; copy the sys_id&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Go to &lt;STRONG&gt;System Properties &amp;gt; Create New &amp;gt; provide the name as you wish example "x_incident.group" &amp;gt;&amp;nbsp;Type as string &amp;gt; and value will be the copied sys_id.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Below is the Business rule:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if (current.category == 'hardware') {
        var groupSysId = gs.getProperty('x_incident.group');
        if (groupSysId) {
            current.assignment_group = groupSysId;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my response helped please mark it correct or Helpful.&lt;/P&gt;&lt;DIV class=""&gt;Regards,&lt;/DIV&gt;&lt;DIV class=""&gt;Madhuri&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Jul 2025 11:39:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328818#M1395</guid>
      <dc:creator>MC30</dc:creator>
      <dc:date>2025-07-21T11:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Incident Management business rule script (Beginner)</title>
      <link>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328820#M1396</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/940835"&gt;@DaramK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;no scripting required.&lt;/P&gt;
&lt;P&gt;you can use before insert/update business rule&lt;/P&gt;
&lt;P&gt;Condition: Category == Hardware&lt;/P&gt;
&lt;P&gt;Use Set Field Values Tab and set the group&lt;/P&gt;
&lt;P&gt;Something like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_0-1753098081628.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/457331iBAF609AF98AF895D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_0-1753098081628.png" alt="AnkurBawiskar_0-1753098081628.png" /&gt;&lt;/span&gt;&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="AnkurBawiskar_1-1753098093267.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/457332iF72687A398851676/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_1-1753098093267.png" alt="AnkurBawiskar_1-1753098093267.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;In your above script set the group sysId&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;if (current.category == "hardware") {
current.assignment_group = "groupSysId";
}
&lt;/LI-CODE&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 11:41:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cloud-cost-management-forum/need-help-with-incident-management-business-rule-script-beginner/m-p/3328820#M1396</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-07-21T11:41:36Z</dc:date>
    </item>
  </channel>
</rss>

