<?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: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))? in ITOM forum</title>
    <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042552#M101597</link>
    <description>&lt;P&gt;Hi Josh,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is the script that you can run from background script to remove the value from "Extends table"&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1468183627818380" data-renderedposition="71_8_1192_208" jivemacro_uid="_1468183627818380"&gt;&lt;P&gt;updateTableChanges();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;function updateTableChanges()&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; var gr = new GlideRecord('sys_db_object');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.addQuery('sys_id','0799e3554f606a00bbc32d118110c77b'); //Replace sys_id with the exact table record&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.query();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; while(gr.next())&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.super_class = '';&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.setWorkflow(false);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.update();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Please create a test table and then try this on dev first to make sure everything is working fine. Once you are done with the testing then you can try this with the table you have created.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://www.servicenowelite.com/blog/2014/1/17/how-to-use-background-scripts" title="http://www.servicenowelite.com/blog/2014/1/17/how-to-use-background-scripts"&gt;Background Scripts — ServiceNow Elite&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Sun, 10 Jul 2016 20:49:30 GMT</pubDate>
    <dc:creator>Pradeep Sharma</dc:creator>
    <dc:date>2016-07-10T20:49:30Z</dc:date>
    <item>
      <title>Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042551#M101596</link>
      <description>&lt;P&gt;When developing a few custom tables, I selected the "Track in Update Sets" option thinking this option had to be selected to track schema changes in the tables (add/remove/rename columns, etc). We pushed an update set to our testing instance today and I noticed the data from the custom tables was also transferred over in the Update Sets. Looking more into this, by selecing the "Track in Update Sets" option, the tables now extend Application File (sys_metadata). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way I can remove the "Track in Update Sets" from the tables? Or, in otherwords - unextend the custom tables from sys_metadata? If its not possible to break the connection to sys_metadata, is it possible to configure all update sets to ignore any changes to the custom tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the assistance!&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2016 20:23:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042551#M101596</guid>
      <dc:creator>joshgrochowski</dc:creator>
      <dc:date>2016-07-10T20:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042552#M101597</link>
      <description>&lt;P&gt;Hi Josh,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is the script that you can run from background script to remove the value from "Extends table"&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1468183627818380" data-renderedposition="71_8_1192_208" jivemacro_uid="_1468183627818380"&gt;&lt;P&gt;updateTableChanges();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;function updateTableChanges()&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; var gr = new GlideRecord('sys_db_object');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.addQuery('sys_id','0799e3554f606a00bbc32d118110c77b'); //Replace sys_id with the exact table record&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.query();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; while(gr.next())&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.super_class = '';&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.setWorkflow(false);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; gr.update();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Please create a test table and then try this on dev first to make sure everything is working fine. Once you are done with the testing then you can try this with the table you have created.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://www.servicenowelite.com/blog/2014/1/17/how-to-use-background-scripts" title="http://www.servicenowelite.com/blog/2014/1/17/how-to-use-background-scripts"&gt;Background Scripts — ServiceNow Elite&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 10 Jul 2016 20:49:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042552#M101597</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2016-07-10T20:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042553#M101598</link>
      <description>&lt;P&gt;Thank you Pradeep! This appears to have worked as expected.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 10 Jul 2016 23:55:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042553#M101598</guid>
      <dc:creator>joshgrochowski</dc:creator>
      <dc:date>2016-07-10T23:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042554#M101599</link>
      <description>&lt;P&gt;HI Josh,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Unfortunately, by running the change suggested by Pradeep, you will likely have broken your custom table. The parent table hosts the sys_updated_by, sys_created, and other "system" columns. Removing the parent reference severs the relationship those rows have with their data for those columns, and new rows no longer have storage or values for those columns. These actions also result in "orphaned" data in the parent table, too, and this will cause you other problems down the line.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you've created new data in that table since running the change, then the damage is already done and you can't undo it by simply reconnecting the table with its parent, either, because only some of the rows will have matches in the parent table. And thus you'll run into odd errors with that table going forward.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You could attempt to fix this by backing up the existing data, followed by deleting the damaged table, and re-creating it and then importing the data back in again. We also recommend not updating sys_db_object or sys_dictionary using a custom script, without first vetting the potential consequences directly with ServiceNow Customer Support first.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Going forward, should you need to make such a change again, we would highly recommend using the following API instead of Pradeep's script:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Steps to reparent table:&lt;/P&gt;&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;Elevate your privileges to security admin&lt;/LI&gt;&lt;LI&gt;In scripts - background run this script (replacing variables as needed)&lt;/LI&gt;&lt;LI&gt;new GlideTableParentChange("custom_table").change("current_parent", "new_parent");&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Important Notes:&lt;/P&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Always test first in a test or a development ServiceNow instance&lt;/LI&gt;&lt;LI&gt;This API does work against tables with data in them, however it is best used against new or empty tables.&lt;/LI&gt;&lt;LI&gt;This API should not be used against flattened tables that extend Task.&lt;/LI&gt;&lt;LI&gt;This is a manual step and thus isn't captured in an update set.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;So in your case you would want to try using 'new GlideTableParentChange("custom_table").change("sys_metadata", "");'&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Aug 2016 17:59:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042554#M101599</guid>
      <dc:creator>Lane Roberts</dc:creator>
      <dc:date>2016-08-01T17:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042555#M101600</link>
      <description>&lt;P&gt;Thanks a lot Lane for the update.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Aug 2016 18:05:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042555#M101600</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2016-08-01T18:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042556#M101601</link>
      <description>&lt;P&gt;Great Info. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" data-renderedposition="8_78.03125_16_16" src="https://www.servicenow.com/8.0.4.21bdc7e/images/emoticons/happy.png"&gt;&lt;/SPAN&gt; @Lane&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2017 05:14:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042556#M101601</guid>
      <dc:creator>ranjanireddy</dc:creator>
      <dc:date>2017-12-11T05:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?</title>
      <link>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042557#M101602</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Removing update_synch=true attribute in Collection record for custom table in Dictionary worked for me. Jakarta, patch 4.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2018 11:59:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/remove-a-custom-table-data-from-update-sets-unextend-application/m-p/1042557#M101602</guid>
      <dc:creator>dmitriy_apunevi</dc:creator>
      <dc:date>2018-02-08T11:59:58Z</dc:date>
    </item>
  </channel>
</rss>

