<?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: create asset reference field on requested.item table and re-reference it to sc_task table in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3313064#M1213867</link>
    <description>&lt;P&gt;I have found the solution, created a business rule on requested_item by creating a reference field(alm_hardware) on both table i.e. sc_task, sc_req_item&lt;BR /&gt;&lt;BR /&gt;Before - Insert/update&lt;BR /&gt;Condition - Assets&amp;lt;&amp;lt; changes&amp;nbsp;&lt;/P&gt;&lt;P&gt;(function executeRule(current, previous /null when async/) {&lt;/P&gt;&lt;P&gt;var taskGR = new GlideRecord('sc_task');&lt;BR /&gt;taskGR.addQuery('request_item', current.sys_id); // Link to RITM&lt;BR /&gt;taskGR.query();&lt;/P&gt;&lt;P&gt;while (taskGR.next()) {&lt;BR /&gt;taskGR.u_ritm_assedt = current.u_asset; // Copy the asset from RITM&lt;BR /&gt;taskGR.update(); // Save changes&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;})(current, previous);&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jul 2025 18:01:14 GMT</pubDate>
    <dc:creator>abdulrehman</dc:creator>
    <dc:date>2025-07-07T18:01:14Z</dc:date>
    <item>
      <title>create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312652#M1213788</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;&lt;BR /&gt;Happy Monday!!&lt;BR /&gt;I need some help. In service now I have created a reference field name assets that is coming from hardware table on request_item, now I want the same field on sc_task table with same data from RITM asset field.. But it should&amp;nbsp;be&amp;nbsp;read&amp;nbsp;only. (the asset field on sc_task should only pull data of requested.item asset field)&lt;BR /&gt;&lt;BR /&gt;How I can achieve this?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 12:51:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312652#M1213788</guid>
      <dc:creator>abdulrehman</dc:creator>
      <dc:date>2025-07-07T12:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312691#M1213800</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/854916"&gt;@abdulrehman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use before insert business rule on sc_task and set the value&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;current.assetFieldTask = current.request_item.assetFieldRITM;&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, 07 Jul 2025 13:19:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312691#M1213800</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-07-07T13:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312699#M1213802</link>
      <description>&lt;P&gt;Just dotwalk the field from the RITM. No need to create it on sc_task. You already have the RITM on the task, so dotwalking to the field is easy and a UI policy can make it read only.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 13:24:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312699#M1213802</guid>
      <dc:creator>Mark Manders</dc:creator>
      <dc:date>2025-07-07T13:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312706#M1213805</link>
      <description>&lt;P&gt;could you please tell me how to do dot walk&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 13:27:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312706#M1213805</guid>
      <dc:creator>abdulrehman</dc:creator>
      <dc:date>2025-07-07T13:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312708#M1213806</link>
      <description>&lt;P&gt;could you please give me the cmplete code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 13:29:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312708#M1213806</guid>
      <dc:creator>abdulrehman</dc:creator>
      <dc:date>2025-07-07T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312785#M1213822</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/854916"&gt;@abdulrehman&lt;/a&gt;AbdulrehmanT,&lt;/P&gt;&lt;P&gt;Hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can dot walk to get the field on to the Catalog Task table (from RITM table), please check the following example that I tried&lt;/P&gt;&lt;P&gt;I created a field 'Related Asset' on RITM table/form&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MasthanSharif_0-1751897042619.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/453884iA27B2F87C0BEC33A/image-size/medium?v=v2&amp;amp;px=400" alt="MasthanSharif_0-1751897042619.png" title="MasthanSharif_0-1751897042619.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I went to the form layout of Catalog Task(sc_task), select the Requested Item field, expand selected reference field and dot walk to the exact field on the reference field's table field, in my case I dot walked from Requested Item field on Catalog Task to Related Asset field on RITM table&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="MasthanSharif_2-1751897391152.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/453889iF6331FB296EE6EE8/image-size/medium?v=v2&amp;amp;px=400" alt="MasthanSharif_2-1751897391152.png" title="MasthanSharif_2-1751897391152.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MasthanSharif_3-1751897443391.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/453891iBDE6145CCC350E33/image-size/medium?v=v2&amp;amp;px=400" alt="MasthanSharif_3-1751897443391.png" title="MasthanSharif_3-1751897443391.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="MasthanSharif_4-1751897602486.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/453892i878530061CA01686/image-size/medium?v=v2&amp;amp;px=400" alt="MasthanSharif_4-1751897602486.png" title="MasthanSharif_4-1751897602486.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sharif&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 14:13:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312785#M1213822</guid>
      <dc:creator>Masthan Sharif</dc:creator>
      <dc:date>2025-07-07T14:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312882#M1213833</link>
      <description>&lt;P&gt;yeah it works but i only wants to show the asset field on some items, not all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 15:11:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3312882#M1213833</guid>
      <dc:creator>abdulrehman</dc:creator>
      <dc:date>2025-07-07T15:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3313064#M1213867</link>
      <description>&lt;P&gt;I have found the solution, created a business rule on requested_item by creating a reference field(alm_hardware) on both table i.e. sc_task, sc_req_item&lt;BR /&gt;&lt;BR /&gt;Before - Insert/update&lt;BR /&gt;Condition - Assets&amp;lt;&amp;lt; changes&amp;nbsp;&lt;/P&gt;&lt;P&gt;(function executeRule(current, previous /null when async/) {&lt;/P&gt;&lt;P&gt;var taskGR = new GlideRecord('sc_task');&lt;BR /&gt;taskGR.addQuery('request_item', current.sys_id); // Link to RITM&lt;BR /&gt;taskGR.query();&lt;/P&gt;&lt;P&gt;while (taskGR.next()) {&lt;BR /&gt;taskGR.u_ritm_assedt = current.u_asset; // Copy the asset from RITM&lt;BR /&gt;taskGR.update(); // Save changes&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;})(current, previous);&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 18:01:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3313064#M1213867</guid>
      <dc:creator>abdulrehman</dc:creator>
      <dc:date>2025-07-07T18:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: create asset reference field on requested.item table and re-reference it to sc_task table</title>
      <link>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3313358#M1213908</link>
      <description>&lt;P&gt;The no code solution would have been a dotwalked field, so it's always exactly the same and only show it on the form for the items you want it on (ui policy). You now have 2 custom fields that need to be in sync, instead of handling everything through one field, without any scripts.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 06:04:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/create-asset-reference-field-on-requested-item-table-and-re/m-p/3313358#M1213908</guid>
      <dc:creator>Mark Manders</dc:creator>
      <dc:date>2025-07-08T06:04:03Z</dc:date>
    </item>
  </channel>
</rss>

