📚 SAP Business One SDK Help

EnableMenu Method
See Also  Example
EnableFlag

Indicates whether the menu item is enabled:

  • True: Enabled
  • False: Disabled

Description

Enables activating and disabling toolbar items when your add-on form is in focus.

In the SAP Business One application, forms control the status of toolbar items. During the form life-cycle, toolbars check their items and enable or disable items depending on the form currently in focus.

Syntax

Visual Basic
Public Sub EnableMenu( _
   ByVal MenuUID As String, _
   ByVal EnableFlag As Boolean _
) 

Parameters

MenuUID
The unique ID of the menu item you want to enable or disable
EnableFlag

Indicates whether the menu item is enabled:

  • True: Enabled
  • False: Disabled

Remarks

You cannot enable or disable toolbar items for SAP Business One application forms.

If you want to enable the application navigation icons for your form, use the new it_BROWSE_BUTTON item type in the Items.Add method.

Example

The following sample code shows how to enable toolbar items.
(Visual Basic)Copy Code
Private Sub SetToolBarEnabled()
  oForm.EnableMenu "1288", True
  oForm.EnableMenu "1289", True
  oForm.EnableMenu "1290", True
  oForm.EnableMenu "1291", True
End Sub


See Also