5 views

Description

After uninstalling an application, application tables that were flattened tables leave behind records in sys_storage_alias and physical columns in the database.

Steps to Reproduce

  1. Create a scoped app (app1) with two tables one standalone (table1) and the other extending task (table2), both with full application access from all other scopes.

  2. Create another scoped app (app2) with two fields, one on table1 and the other on table2.

  3. Export both application packages using the Download Package context menu on the Custom Application form.

  4. Navigate to System Applications > Install Application and install the applications (first app1, then app2) on a target instance where they did not exist before.

  5. Make sure all expected sys_storage_alias records are created. Two of them should be for fields in app2 on tables in app1. Focus on these. 

  6. Create a record to confirm the tables works as expected.

  7. Uninstall the application app2, and do not retain data.

    Note that the sys_storage_alias records identified in step 5 remained behind.

  8. Uninstall the application app1, and do not retain data.

    Note that the one of the sys_storage_alias records identified in step 5, relevant to table2, which is extended, still remained behind, while the other records from both apps have been removed

Workaround

Delete the sys_storage_alias records related to the Scoped Application tables that were dropped while uninstalling the application (this is best done directly on the database). After deleting these sys_storage_alias records, run the following in Scripts - Background to invalidate all related TableDescriptor caches:

GlideTableManager.invalidateTable(GlideDBObjectManager.get().getRoot("x_app_table"));`


Related Problem: PRB644830

Seen In

Fuji Patch 7

Intended Fix Version

Madrid

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-06-14 06:06:24
Published:2018-06-14