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 a comment
10|10000 characters needed characters exceeded

Related questions

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?

    Regards,

    Frank

    Add a 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

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.