Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Moving a taxonomy topic to different parent: “Duplicate topic entry under parent item” error in APN

IanKendricV
Tera Contributor

Hi everyone,

Environment: Employee Center, ServiceNow Australia release, Advanced Portal Navigation (APN) active.

Goal: Move the existing topic “Taxation” from the parent topic “Employee Services” to the parent topic “Finance & Procurement”, so it appears under Finance & Procurement in the Employee Center mega menu (the blue flyout).

 

What I’ve tried:

  1. Changed the parent on the Topic record in the topic table. The list in the emp_taxonomy_topic view updated, but the mega menu still shows Taxation under Employee Services.
  2. Went into Advanced Portal Navigation and tried to edit the menu item records in sn_ex_sp_portal_extensible_navigation_item. There are two “Taxation” menu item records with the same Topic and Taxonomy (Employee taxonomy), but different Parent items: one under Employee Services and one under Finance & Procurement. When I update either one, I get this error: “Duplicate topic Taxation entry under parent item Employee Services.”
  3. I found the Sync hierarchy button on the Menu items related list. The documentation describes it as fetching active topics and menu items, but doesn’t say what happens when a topic has moved to a different parent.

Constraint: We’d rather not delete records

Questions:

  1. Is the mega menu meant to follow a topic’s parent change automatically? Or do the APN menu item records always need to be updated separately?
  2. What does Sync hierarchy do when a topic’s parent has changed: re-parent the existing menu item, create a new one, or skip it?
  3. What is the recommended way to resolve the duplicate Taxation menu items? For example, is deactivating the old record before re-parenting or syncing safe?
  4. Is there a supported way to move a topic between parents in APN without deleting records?
1 REPLY 1

HasanM
Kilo Sage

Hi @IanKendricV , the APN mega menu doesn't follow a topic's parent change on its own. It's built from the menu item records (sn_ex_sp_portal_extensible_navigation_item), not straight from the taxonomy, so those records have to be updated as well.

Sync hierarchy seems to create a new menu item under the new parent rather than move the existing one, which would explain the two Taxation records. To confirm, check its UI action in your instance.

To fix it without deleting anything:

  1. Keep the Taxation menu item under Finance & Procurement.
  2. Set the old one under Employee Services to Active = false.
  3. If the duplicate error still blocks you, check the business rule on the menu item table to see what it treats as a duplicate. If it ignores the active flag, clear the Topic reference on the old record and then deactivate it.
  4. Make sure any child topics' menu items sit under the Taxation item you kept.
  5. Clear the cache (cache.do) or open the portal in a new session.

Next time a topic moves, either re-parent the existing menu item or deactivate it and then run Sync hierarchy. Don't do both. Test it in sub-production first, because the behaviour can differ between patch levels.

If this helped, please mark it as Accept as Solution and Helpful so others with the same issue can find it.