Export/Import custom created menu buttons

Hello,

I'm trying to experiment a bit with the import/export tool of the Aras and I'm having a problem with custom menu items.

As the custom menu buttons were created inside the Administration/Configuration/Client Presentation/Javascript - Global, they're located by default inside the com.aras.innovator.cui_default package.

After I effectuate the export process for this, which executes without any warning/error message and after I'm doing the import to a different Aras Innovator, the main menu (w File, Edit, Views, etc.) is hidden and my custom buttons are not appearing inside the Javascript - Global.

The import/export is working well for other items/methods.

Can you suggest me a solution for this problem, please?

Thank you!

Chris    

  • I also tried to add the custom button only to a new package and import it to a new environment, but it's not appearing at all, nor in the menu, nor in the Administration/Configuration/etc. 

  • Hi Chris_Smoke,

    I've written a blog which goes over some best practices for packaging, which you can find here. It's advised to avoid adding custom development to existing packages, and to instead add them to their own package. I'd also like to make sure that you're packaging up both the button itself, as well as the parent relationship. This will ensure that your button is attached to the CUI location you're adding it to. This project by a Labs team member is incredibly helpful when trying to add CUI items to a package.

    AJ

  • Hi AJ Sebastian,

    Thank you for your reply. I managed to realize a successful export/import process on Aras Innovator 12 with a package of buttons, forms and methods, by using the tool you mentioned at your reply. However, I still cannot succeed with the same process on my Aras Innovator 11, as I can't find the parent relationship of the button. Do you have any suggestion, where can I find this? 

    Thank you!

    Chris

  • Hi Chris,

    The best way to package up that parent relationship is to do it manually. To do this there are a few steps.

    Manually adding an item to a package requires the item/relationship's ID, which is not immediately accessible. You can go into the CommandBarSectionItem Itemtype, and toggle the hidden1/2 flag on the ID property to off. This will display the ID for each instance of that relationship.

    You'll have to create a new PackageDefinition within your PackageGroup. You can use your existing packages in 12 as a guideline. You'll have to create an entry for every button you wish to add to your package, using the ID above. 

    AJ

  • Hi Sebastian,

    Thank you, I tried it and worked. The only problem, which I encounter at both Aras Innovator 11 & 12, is that after the Export/Import processes, the click method disappears from the Button. I tried to do 2 different export packages and import the one with the method at first, just to be sure, that I will have it in the system, but still, after importing the button, the click method is empty. Do we have a relationship between the button and the click method also, which need to be added to the package?

    Thanks!

  • Hi Chris,

    This is a known issue. If you open up the AML file for your commandBarSectionItem, you can compare the ID of the on_init_handler and on_click_handler tags with the corresponding methods. The packaging process grabs the most recent version of the method, as opposed to the config_id, which is what it should be using. We've reported this as an issue and it is being investigated. For now you can manually add the correct method ID into the AML before running the import. The commandBarButton AML contains the correct method ID, but it is overwritten by the commandBarSectionItem.

    AJ

  • Hey Man  try to search in Google!!