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

Q: disable main menu

Hi all,

I would like to prevent the user from taking any action while the addon is loading. (Actually, as soon as the addon connects to the UIAPI.)

I can freeze the menu form (form type 169) and unfreeze it when loading is done.

But if I try to disable the menuitem modules like this:

Dim uimnuMenuItem As SAPbouiCOM.MenuItem

'disable MenuItem modules

uimnuMenuItem = SBO_Application.Menus.Item(3)

'if DisableSBO is True then set enabled to false

uimnuMenuItem.Enabled = false

... the last line creates a generic error in UIAPI. I am using 6.20.36 SP2 patchlevel 10.

Any ideas how to lock parts or all of the menu?

TIA, Lutz Morrien

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 04, 2004 at 07:32 PM

    Hi Lutz,

    with 6.50.52 I don't get an error, but nothing happens as well 😔

    So perhaps the workaround could be to catch all menu events and to simply stop SAP Business One from processing (set BubbleEvent = False).

    Maybe someone got additional information about this question - perhaps avoiding the workaround?



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for answering, Frank.

      I ended up just freezing SAP form 169 (main menu). Catching all events seems a good idea, but what about the events which only come as after action?

      I found that a general problem is that SAP does not lock before loading all addons. With the addon we developed, using SBO without the addon is not desired. Yet, the earliest moment when a programmer can prevent user entries in SBO is after the addon has connected to UIAPI.

      Before that, the user can do a lot of things like opening forms etc.

      I wonder if other developers have the same problem.

      Basically we have to tell the users not to perform an action before the addon has loaded completely.

      Lutz Morrien