<?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 I want to update problem id short des into change request short desc using background script in EAM forum</title>
    <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332033#M5242</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; x=&lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'incident'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;x.addQuery(&lt;/SPAN&gt;&lt;SPAN&gt;'number'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'INC0000011'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;x.query();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(x.next()){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gs.info(x.problem_id.getDisplayValue());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gs.info(x.problem_id.short_description.getDisplayValue());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; x.update(x.problem_id.short_description=x.rfc.short_description);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 23 Jul 2025 12:57:25 GMT</pubDate>
    <dc:creator>TanujB</dc:creator>
    <dc:date>2025-07-23T12:57:25Z</dc:date>
    <item>
      <title>I want to update problem id short des into change request short desc using background script</title>
      <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332033#M5242</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; x=&lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'incident'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;x.addQuery(&lt;/SPAN&gt;&lt;SPAN&gt;'number'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'INC0000011'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;x.query();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(x.next()){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gs.info(x.problem_id.getDisplayValue());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gs.info(x.problem_id.short_description.getDisplayValue());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; x.update(x.problem_id.short_description=x.rfc.short_description);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Jul 2025 12:57:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332033#M5242</guid>
      <dc:creator>TanujB</dc:creator>
      <dc:date>2025-07-23T12:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: I want to update problem id short des into change request short desc using background script</title>
      <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332167#M5244</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/946929"&gt;@TanujB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the below script..&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var inc = new GlideRecord('incident');
inc.addQuery('number','INC0000506');
inc.query();
if(inc.next()){
inc.short_description = inc.problem_id.short_description;
inc.update();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Regards,.siva&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 14:06:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332167#M5244</guid>
      <dc:creator>J Siva</dc:creator>
      <dc:date>2025-07-23T14:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: I want to update problem id short des into change request short desc using background script</title>
      <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332199#M5245</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/946929"&gt;@TanujB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you want to update the change short description? then use this script&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var incGr = new GlideRecord('incident');

if (incGr.get('number', 'INC0000011')) {
    gs.info(incGr.problem_id.getDisplayValue());
    gs.info(incGr.problem_id.short_description);
    var chgGr = incGr.rfc.getRefRecord();
    if (chgGr.isValidRecord()) {
        chgGr.short_description = incGr.problem_id.short_description;
        chgGr.update();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want to update the problem short description from change short description use this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var incGr = new GlideRecord('incident');

if (incGr.get('number', 'INC0000011')) {
    gs.info(incGr.problem_id.getDisplayValue());
    gs.info(incGr.problem_id.short_description);
    var prbGr= incGr.problem_id.getRefRecord();
    if (prbGr.isValidRecord()) {
        prbGr.short_description = incGr.rfc.short_description;
        prbGr.update();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please mark my answer as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;helpful/correct&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;if it resolves your query.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Regards,&lt;BR /&gt;Chaitanya&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 14:19:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332199#M5245</guid>
      <dc:creator>Chaitanya ILCR</dc:creator>
      <dc:date>2025-07-23T14:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: I want to update problem id short des into change request short desc using background script</title>
      <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332216#M5246</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/946929"&gt;@TanujB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're trying to copy the &lt;STRONG data-start="57" data-end="88"&gt;Problem's short description&lt;/STRONG&gt; into the &lt;STRONG data-start="98" data-end="136"&gt;Change Request's short description&amp;nbsp;&lt;/STRONG&gt;so please you the script below and see how it works for you and the logs will help you to understand the execution as well, so try to debug if anything goes wrong based on the logs also make sure your change req record reference is stored in rfc field only if you're using any other like "Parent" so just update that in the below script.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var incGR = new GlideRecord('incident');
if (incGR.get('number', 'INC0000011')) {
    
    var probGR = incGR.problem_id;
    var rfcGR = incGR.rfc; // Assuming 'rfc' is a reference to Change Request
    
    if (probGR &amp;amp;&amp;amp; rfcGR) {
        var changeGR = new GlideRecord('change_request');
        if (changeGR.get(rfcGR)) {
            changeGR.short_description = probGR.short_description;
            changeGR.update();
            gs.info('Updated Change Request short description with Problem short description.');
        } else {
            gs.info('Related Change Request not found.');
        }
    } else {
        gs.info('Either Problem or RFC reference is missing.');
    }

} else {
    gs.info('Incident not found.');
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; Please mark &lt;/STRONG&gt;&lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; Correct if this solves your query, and &lt;/STRONG&gt;&lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; Helpful if you found the response valuable.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Aniket Chavan&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":trophy:"&gt;🏆&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; ServiceNow MVP 2025 | &lt;/STRONG&gt;&lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; ServiceNow Rising Star 2024&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 14:27:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3332216#M5246</guid>
      <dc:creator>AniketC85155510</dc:creator>
      <dc:date>2025-07-23T14:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: I want to update problem id short des into change request short desc using background script</title>
      <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3342784#M5350</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/946929"&gt;@TanujB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Just wanted to check in to see if my earlier response helped you out or if you're still facing any issues. If your query is resolved, it would be great if you could mark my reply as &lt;/SPAN&gt;&lt;STRONG&gt;helpful&lt;/STRONG&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;STRONG&gt;accept&lt;/STRONG&gt;&lt;SPAN&gt; it as the solution — that way it can also benefit others who come across the thread later.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, if you found any &lt;/SPAN&gt;&lt;STRONG&gt;other responses&lt;/STRONG&gt;&lt;SPAN&gt; helpful, feel free to mark those as helpful too. You can even accept multiple solutions if they contributed to resolving your issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let me know if you need anything else!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Aniket Chavan&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":trophy:"&gt;🏆&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; ServiceNow MVP 2025 | &lt;/STRONG&gt;&lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;EM&gt;&lt;STRONG&gt; ServiceNow Rising Star 2024&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2025 12:44:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3342784#M5350</guid>
      <dc:creator>AniketC85155510</dc:creator>
      <dc:date>2025-08-04T12:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: I want to update problem id short des into change request short desc using background script</title>
      <link>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3355471#M5393</link>
      <description>&lt;P&gt;Hello &lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/946929"&gt;@TanujB&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just wanted to check in to see if my earlier response helped you out or if you're still facing any issues. If your query is resolved, it would be great if you could mark my reply as &lt;STRONG&gt;helpfu&lt;/STRONG&gt;l and &lt;STRONG&gt;accept&lt;/STRONG&gt; it as the solution — that way it can also benefit others who come across the thread later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if you found any other responses helpful, feel free to mark those as helpful too. You can even accept multiple solutions if they contributed to resolving your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Let me know if you need anything else!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Aniket Chavan&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":trophy:"&gt;🏆&lt;/span&gt; &lt;STRONG&gt;ServiceNow MVP 2025 | &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;STRONG&gt; ServiceNow Rising Star 2024&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 13:19:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/eam-forum/i-want-to-update-problem-id-short-des-into-change-request-short/m-p/3355471#M5393</guid>
      <dc:creator>AniketC85155510</dc:creator>
      <dc:date>2025-08-19T13:19:28Z</dc:date>
    </item>
  </channel>
</rss>

