Skip to Content
author's profile photo Former Member
Former Member

Remove custom menu items before disconnecting Add-On

Hello everybody,

I want to remove some custom menu items which I added while disconnecting the add-on.

Currently I have a main menu item and 5 sub menu items. So my question is removal of just

the main menu item is enough or do I have to remove all the sub menu items too?

Also could you please provide a sample version of how my xml file should look like?

Because I have never used xml files to add the menu items. I used SAPbouiCOM.MenuCreationParams

to add it(c#).

Any help would be highly appreciated 😊

Thanks in advance

question.PNG (8.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 13, 2016 at 12:27 AM

    Hi Isuru,

    The easiest to remove menus is :

    if (SBO_Application.Menus.Exists("ParentMenuUID")) SBO_Application.Menus.RemoveEx("ParentMenuUID");

    No need to use XML since this is only one step.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 12, 2016 at 07:25 PM

    Hi Isuru,

    You only need to remove the parent menu item in the XML file as this will automatically remove any child items.

    Here's an example XML file:



    <action type="remove">

    <Menu FatherUID="1536" String="Widget Entry" UniqueID="ABC_MY_MENU_ID"/>




    Note that the action type is set to "remove". I think the FatherUID and String are optional fields but I include them in my XML as it's easier to understand and maintain.

    Call the LoadBatchActions method of the SBO application object and pass it the above XML to remove the menu. This code should be added to the application event where BoAppEventTypes is ShutDown or ServerTerminition. If your addon is multi-lingual, you can also remove and recreate your menus when BOAppEventTypes is LanguageChanged.

    Kind Regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.