Type navigation 3rd button - Goto ItemType [Definition]

I'd like there to be a third button here, for Admin(s).

While going through Configuring Solutions, for v12, I can't help but think of a very convenient 3rd button right here to eliminate navigating to an Item Type's definition:

[Currently] Administration > ItemTypes > Enter search text for IT, find and finally open to edit... could also be:
[3rd button] Click (Edit | View | Goto) ItemType

I think this would be especially useful for admins as they need to check on TOC settings, or set sort rules, and on and on... Just click the [proposed] button!

  • Hi Neil,

    For most areas of the user interface, it's possible to add buttons like this using CUI. However, it seems this secondary menu hasn't yet been migrated to use the CUI data model. As an alternative, it would be possible to add an option to the context menu when you right click on an ItemType in the main grid. 

    This is possible through CUI following similar steps to the ones in this blog post and this corresponding community project. If you follow along with the blog post note that the item you edit in Step 2 will be different since you're editing a different area of the UI. Instead, you will want to find the Command Bar Section (the item that defines a general area of the UI) with the information below.

    • Classification - Data Model
    • Name - com.aras.innovator.cui_default.popup_menu_for_main_window_toc
    • LocationPopupMenuMainWindowTOC


    Christopher Gillis

    Aras Labs Software Engineer

  • Notes on issue:
    The button would be added in Innovator/Client/Modules/aras/NavigationPanel.js, after ~line 123. Here is the search button per ItemType secondary left-nav menu.

    Here we have access to the *itemTypeId*. But, it is passed to searchItemType here. We need whatever is called when viewing item types table and double clicking a row.


    Using the itemTypeId we should be able to get to the item type edit form for a certain item type. I'm not sure, but I believe this could be a call to whatever creates the url including virtualGetForm, maybe!?

    Any input on that would be like totally awesome!

    Going to investigate what this call to aras.getResource does. I think it is just getting label text as the text appears dynamic and not set using a psuedo selector content property...

    Here, I just copy/pasted the search button, added static text (notice the search text is appended after) and made the onclick alert with the item type id.

  • Is this post not in Forums > Development?

  • Further discoveries include: Edit ui_resources.xml to then be able to use the function aras.getResource and use dynamic text...

    ...resulting in:

    Here, the icon is an svg, using the "use" tag to pull in shared resources. I just found the pointer to ItemType icon and replaced the use xlink:href to end with: #svg-itemtype

    The click currently still just does an alert with:
    onclick="${() => alert(secondaryMenuData.itemTypeId)}"

    The code change in NavigationPanel.js was to tack this on ~ln123 for a third button. The inline styling is just me figuring stuff out w/o touching the CSS (because I'd add a ...__secondary-menu-goto-button style, but I don't know yet how to make the JS get re-minified, trigger a build or whatever). And... I cannot just paste this and don't have the time so a pictue of code:

    So... my ask is:

    How to utilize the onclick in conjunction with the item type id we already have available?

  • Hi Neil,

    Since you already have the ID of the ItemType, you can use a handy function on the aras object to open up the associated ItemType. 

    aras.uiShowItem("ItemType", secondaryMenuData.itemTypeId);

    You can also uiShowItem to open any item in the database, not just ItemTypes. The first argument is a string of the name of the ItemType you want to open and the second argument is the ID of the item you want to open. For completeness, I'll also mention that there are more arguments that you can pass in to uiShowItem, but in almost all use cases, you'll only need to use the ItemType name and item ID.


  • Mind blown!

    To me, I prefer this sort of fix rather than just the context menu - but, I think it makes sense to also add to the right-click [ "New", "Search" ] functionality for any item type, for admin usage, a button/link/option that takes you to the ItemType.

    So nice! Thanks a bunch, . I feel one change I have is not a hack. Sweet!