Notifications

922 views

Description

Records in the [sys_storage_alias] table are not deleted when dropping a field from an extended table via an update set commit.

The most common symptoms of this issue are:

  • When the field has been dropped and re-created and when saving a value for that field on a form, the new value does not seem saved although the Audit History shows that it has been saved. The issue does not occur all the time.

  • The deleted field (its name and not its label) still appears in slushbucket selection for the list view and form or in System Definition > Tables & Columns.

  • The deleted field still appears on the form. The field name displays instead of its label.

  • The following error is issued when trying to save a form: "Syntax Error or Access Rule Violation detected by database (Column '<field_name>' specified twice)"  (note: the <field_name> is the orphan Storage Alias).

  • The following error is issued when trying to re-create the field: "Syntax Error or Access Rule Violation detected by database (Unknown column '<table_name>.<field_name')".

 

Steps to Reproduce

 

  1. Import, Preview, and Commit the attached FieldCreate_apply_first.xml update set.

    This update set creates two fields, one on [incident] and one on [sys_broadcast_message].

    For more information, see the documentation topic Update set administration.

  2. Verify that records exist in [sys_dictionary] and [sys_storage_alias] for the two fields Incident.FooIncidentCol and Broadcast Message.BarBroadcast.

  3. Import, Preview, and Commit the attached FieldDelete_apply_second.xml update set.

    This update set deletes for both fields).

    Expected Result:: Records in [sys_dictionary] and [sys_storage_alias] for both fields are deleted and the following lines of code return false:

    • gs.print(GlideTableDescriptor.fieldExists("incident", "u_fooincidentcol"));
      gs.print(GlideTableDescriptor.fieldExists("sys_broadcast_message", "u_barbroadcast"));

    Actual Result: Record in [sys_storage_alias] for [incident.u_fooincidentcol] is still present.

    • gs.print(GlideTableDescriptor.fieldExists("incident", "u_fooincidentcol")); // returns true when it should be false

    • gs.print(GlideTableDescriptor.fieldExists("sys_broadcast_message", "u_barbroadcast")); // returns false, which is correct.

Workaround

Contact ServiceNow Customer Support to remove the problematic records from the [sys_storage_alias] table.


Related Problem: PRB900722

Seen In

Helsinki Patch 5
Istanbul Patch 5 Hot Fix 1

Fixed In

Istanbul Patch 6
Jakarta

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-07-20 10:53:42
Published:2018-06-27