<?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: How to add hyperlink into info message on problem  table in ServiceNow Impact forum</title>
    <link>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751373#M2341</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/77287"&gt;@vinod6&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you elaborate the requirement?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to display an info message if an Incident that belongs to that particular problem is resolved? If yes try the below Display Business Rule.&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="AnveshKumarM_0-1701682131429.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310102iC539D7E385A143C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="AnveshKumarM_0-1701682131429.png" alt="AnveshKumarM_0-1701682131429.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="AnveshKumarM_1-1701682169640.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310103i5DCFD5BB833364A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="AnveshKumarM_1-1701682169640.png" alt="AnveshKumarM_1-1701682169640.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="AnveshKumarM_2-1701682198534.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310104i4BDEB4480ADFBE9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="AnveshKumarM_2-1701682198534.png" alt="AnveshKumarM_2-1701682198534.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;(function executeRule(current, previous /*null when async*/ ) {

    var incGr = new GlideRecord("incident");
    incGr.addEncodedQuery("problem_id=" + current.getUniqueValue() + "^state=6");
    incGr.query();
    while (incGr._next()) {
        var link = '&amp;lt;a href="' + incGr.getLink() + '"&amp;gt;' + incGr.getValue('number') + '&amp;lt;/a&amp;gt;';
        var message = gs.getMessage('Incident Resolved') + ' ' + link + ' ';
        gs.addInfoMessage(message);
    }

})(current, previous);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to display Closed incidents also, try below code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;(function executeRule(current, previous /*null when async*/ ) {

    var incGr = new GlideRecord("incident");
    incGr.addEncodedQuery("problem_id=" + current.getUniqueValue() + "^stateIN6,7");
    incGr.query();
    while (incGr._next()) {
        var link = '&amp;lt;a href="' + incGr.getLink() + '"&amp;gt;' + incGr.getValue('number') + '&amp;lt;/a&amp;gt;';
        var message = gs.getMessage('Incident Resolved') + ' ' + link + ' ';
        gs.addInfoMessage(message);
    }

})(current, previous);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark my answer helpful and accept as a solution if it helped&amp;nbsp;&lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Dec 2023 09:31:42 GMT</pubDate>
    <dc:creator>AnveshKumar M</dc:creator>
    <dc:date>2023-12-04T09:31:42Z</dc:date>
    <item>
      <title>How to add hyperlink into info message on problem  table</title>
      <link>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751356#M2339</link>
      <description>&lt;P&gt;&lt;SPAN&gt;For example, when a certain incident record is&amp;nbsp;"resolved" we get an info message&amp;nbsp;into the problem table&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="vinod6_0-1701681065856.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310098i2501ECA1DF6D3346/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vinod6_0-1701681065856.png" alt="vinod6_0-1701681065856.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please help any one.&lt;/P&gt;&lt;P&gt;Please send the script. It is very helpful for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 09:13:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751356#M2339</guid>
      <dc:creator>vinod6</dc:creator>
      <dc:date>2023-12-04T09:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add hyperlink into info message on problem  table</title>
      <link>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751358#M2340</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/77287"&gt;@vinod6&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can simply add html in the message. Something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//incident part provided as bascix example
var inc = new GlideRecord('incident');
inc.insert();

var url = '&amp;lt;a href="./incident.do?sys_id=' + inc.sys_id + '&amp;gt;' + inc.number + '&amp;lt;/a&amp;gt;';
gs.addInfoMessage('Incident ' + url ' + ' has been created.');&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 04 Dec 2023 09:18:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751358#M2340</guid>
      <dc:creator>Peter Bodelier</dc:creator>
      <dc:date>2023-12-04T09:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to add hyperlink into info message on problem  table</title>
      <link>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751373#M2341</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/77287"&gt;@vinod6&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you elaborate the requirement?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to display an info message if an Incident that belongs to that particular problem is resolved? If yes try the below Display Business Rule.&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="AnveshKumarM_0-1701682131429.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310102iC539D7E385A143C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="AnveshKumarM_0-1701682131429.png" alt="AnveshKumarM_0-1701682131429.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="AnveshKumarM_1-1701682169640.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310103i5DCFD5BB833364A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="AnveshKumarM_1-1701682169640.png" alt="AnveshKumarM_1-1701682169640.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="AnveshKumarM_2-1701682198534.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/310104i4BDEB4480ADFBE9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="AnveshKumarM_2-1701682198534.png" alt="AnveshKumarM_2-1701682198534.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;(function executeRule(current, previous /*null when async*/ ) {

    var incGr = new GlideRecord("incident");
    incGr.addEncodedQuery("problem_id=" + current.getUniqueValue() + "^state=6");
    incGr.query();
    while (incGr._next()) {
        var link = '&amp;lt;a href="' + incGr.getLink() + '"&amp;gt;' + incGr.getValue('number') + '&amp;lt;/a&amp;gt;';
        var message = gs.getMessage('Incident Resolved') + ' ' + link + ' ';
        gs.addInfoMessage(message);
    }

})(current, previous);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to display Closed incidents also, try below code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;(function executeRule(current, previous /*null when async*/ ) {

    var incGr = new GlideRecord("incident");
    incGr.addEncodedQuery("problem_id=" + current.getUniqueValue() + "^stateIN6,7");
    incGr.query();
    while (incGr._next()) {
        var link = '&amp;lt;a href="' + incGr.getLink() + '"&amp;gt;' + incGr.getValue('number') + '&amp;lt;/a&amp;gt;';
        var message = gs.getMessage('Incident Resolved') + ' ' + link + ' ';
        gs.addInfoMessage(message);
    }

})(current, previous);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark my answer helpful and accept as a solution if it helped&amp;nbsp;&lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 09:31:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-impact-forum/how-to-add-hyperlink-into-info-message-on-problem-table/m-p/2751373#M2341</guid>
      <dc:creator>AnveshKumar M</dc:creator>
      <dc:date>2023-12-04T09:31:42Z</dc:date>
    </item>
  </channel>
</rss>

