Altering an existing NavigationMenuItem can leave behind dangling externalized references to Custom Objects
Last updated 2020-02-15 ·Reference W-6435825 ·Reported By 1 users
Altering an existing NavigationMenuItem can leave behind dangling externalized references to Custom Objects. This is especially problematic where the object referenced is contained in a managed package a customer is attempting to uninstall.
Reproducible in any org, verified in 220.
1. Create a custom object + custom tab for the new object. -OR- install a package that contains a custom object + custom tab for object + list view.
2. Create a new lightning community (e.g. customer service), or alternatively open an existing one.
3. Create a new navigation menu item:
a. Name = XXXXXX
b. Type = Salesforce Object
c. Object Type = <Custom Object From #1>
4. Publish the community.
5. Go back to Salesforce setup, and try to delete the custom object from the org -OR- if you installed a package containing the custom object, trying uninstalling the package.
6. You should get an error preventing you from deleting/uninstalling it, which is expected.
7. Go back to community builder.
8. Edit the Navigation menu item from #3, and change the 'Type' to something other than 'Salesforce Object' e.g. Menu Label or Community page.
9. Publish the community.
10. Now go back to setup and try to either delete the custom object -OR- uninstall the package containing the custom object.
Deleting the menu item completely will clear the reference, but this is not a feasible option for most customers, as it requires deleting and recreating menu items.
The alternative is to contact Salesforce support who needs to identify the dangling reference belonging to the navigation menu item and remove it manually.
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.