AddNavBarButton()

Examples


The AddNavBarButton() function defined for the syNavBarBtnObj form adds a button to the Navigation pane.

Syntax

AddNavBarButton(UserID, Sequence, Visible, CmdDictID, CmdFormID, CmdID, 0, 0, 0, CloneCmd)

Parameters

UserID – A string that specifies to which user’s set of menus the button will be added. Specify the empty string ("") to add to the default set of menus.

Sequence – An integer variable that specifies the position of the button in the Navigation pane. The value 0 specifies the button will be added to the end of the list. The actual position of the button will be returned after it is added.

You should always specify the value 0 for this variable to add the new Navigation pane button to the end of the list.


Visible – A boolean that specifies whether the button is visible in the Navigation pane. The value true specifies the button is visible, while the value false specifies that it is not.

CmdDictID – The ID of the dictionary that contains the command to use for the Navigation pane button.

CmdFormID – The resource ID of the command form that contains the definition of the command to be added to the Navigation pane.

CmdID – The resource ID of the command to be added to the Navigation pane.

CloneCmd – A boolean parameter. The value true specifies that the command will be added for all users, while the value false specifies that the command will be added for only the current user. You should always specify the value true when adding a new Navigation pane button.

Return value

An integer indicating whether the command was added to the menu. The value corresponds to one of the following constants:

[spacer]

Constant

Description

OKAY

The button was successfully added.

DUPLICATE

The button was not added because it already exists.


Comments

Microsoft Dynamics GP can have a maximum of 20 Navigation pane buttons.


Documentation Feedback