sys_metadata_delete entry in update set

ShAn21
Tera Guru

Hi folks,

I just deleted one field from a table and I can see a entry of type sys_metadata_delete in my update set.

When I have previously deleted the fields from any table I usually saw only 2 entries. label and dictionary.

Can someone explain why is this entry present? Is it bcoz this field had data in the table?

or is it coz I created the new field with the same name?

Is it safe to move it forward?

Thanks

1 ACCEPTED SOLUTION

Hi,

    For more information please refer this link,

 https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0862924

View solution in original post

8 REPLIES 8

Nasreenfathima
Giga Expert

Hi,    

 

Deleting and recreating a field with the SAME name on [task] (or a child table) adds 'sys_metadata_delete' records to the Update Set that captures the recreation of the field.

These 'sys_metadata_delete' records interfere with the field creation on the target instance. At commit time, the "Confirm Data Loss" warning is displayed: "If you commit this update set, the system will automatically delete all data stored in the tables and columns that are defined in these Customer Updates:"

As a result, the field has a [sys_dictionary] record, a [sys_documentation] record but no [sys_storage_alias] record. The label appears blank and cannot be changed.

 

Steps to reproduce:

  1. Create a new Update Set and make it current.
  2. From [sys_dictionary], create a new field on a table extending [task]. (For example: [incident], new data/time field). Make a note of the name.
  3. Complete and export the Update Set.
  4. Create another Update Set and make it current.
  5. Delete the field created at step 2.
  6. Complete and export the Update Set.
  7. Create another Update Set and make it current.
  8. From [sys_dictionary], create a new field with the SAME name as step 2 >>> Column label and name should be the same.
  9. Access the Update Set and observe that it includes 2 'sys_metadata_delete' records > 1 for the Dictionary and 1 for the Documentation.
  10. Complete and export the Update Set.
  11. On another instance, apply all 3 Update Sets in order.

> Current behavior: The field has a [sys_dictionary] record, a [sys_documentation] record but no [sys_storage_alias] record.

> Expected behavior: The  'sys_metadata_delete' records should not be included in the Update Set when recreating the field.

 

Please mark as helpful or correct , if this solution helps you.

Hi Nasreen

Thanks a lot for the response. Just a quick clarification

1) Can I not proceed with all entries in a single update set?

2) what do you mean when you say "These 'sys_metadata_delete' records interfere with the field creation on the target instance". This interference is in a positive way to create the new field in right way?

3) Got confused with the current behavior and expected behavior part?

 

Thanks

Hi,

  1)you have to create one more updateset

2)Yes. that sys_metadata_delete is interfering with  another instance of field creation. bcoz, the field name is same.

3)current behavior is what you mentioned in question

  Expected behavior is sys_metadata_delete record will not be there in updateset

hi,

  For more information please refer this link,  

   https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0862924