Navigation pane category

The Navigation pane category is defined by a command that you add to your integration. You will register triggers to add the Navigation Pane category and its content.

Navigation pane command list

A command list is used to define the Navigation Pane category. Typically, you will add the command list for the Navigation pane to the same command form that you are using for the other commands in your integration. The command list should have the following characteristics:

Command Name   The command name should indicate that the command is being used for a Navigation pane category. For instance, the command for the sample integrating application is Navigation_IGSample.

Display Name   This name is used for the button in the Navigation Pane.

Type   The command type must be set to Command List.

Image Type   This should be set to Icon.

Normal Image   This should be set to an image that represents the Navigation pane category.

Toolbar Item Options   This should be set to Image + Text.

Adding the Navigation pane category

To add the Navigation pane category, you will register a procedure trigger for the CreateDefaultNavBarButtons procedure. The trigger processing procedure verifies whether the Navigation pane category already exists. If it doesn’t, the category is added.

The following example is a portion of the Startup script for the sample integrating application. It registers the trigger for the CreateDefaultNavBarButtons procedure.

l_result = Trigger_RegisterProcedure(script CreateDefaultNavBarButtons, TRIGGER_AFTER_ORIGINAL, script IG_CreateNavigationBarButton);
if l_result <> SY_NOERR then
	warning "Trigger registration for CreateDefaultNavBarButtons failed.";
end if;

The following is the trigger processing procedure that adds the Navigation pane category for the sample integrating application. It uses the AddNavBarButton() function to add the new category, but only if categories haven’t been added already.

local string sWhere;
local integer nStatus, nSeq;

sWhere = physicalname('CmdParentDictID' of table syNavBarButtons) + CH_SPACE + CH_EQUAL + CH_SPACE + str(IG_PROD_ID);

{Find out whether the Navigation pane categories for this product have already been added}
range clear table syNavBarButtons;
range table syNavBarButtons where sWhere;
get first table syNavBarButtons;
if err() = OKAY then
	abort script;
end if;

nSeq = 0;
{Add the button to navigation}
nStatus = AddNavBarButton("",
	nSeq,
	true,
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command Navigation_IGSample of form Command_IG_Sample),
	0, 0, 0,
	true) of form syNavBarBtnObj;

Defining Navigation Pane content

To add the content of the new Navigation pane category, you will register a procedure trigger for the CreateDefaultNavButtonMenuStructure procedure. The trigger processing procedure adds links for the Area Page and lists that appear in the Navigation pane. Adding items to the Navigation pane is similar to adding them to any other menu in Microsoft Dynamics GP.

The following example is a portion of the Startup script for the sample integrating application. It registers the trigger for the CreateDefaultNavButtonMenuStructure procedure.

l_result = Trigger_RegisterProcedure(script CreateDefaultNavButtonMenuStructure, TRIGGER_AFTER_ORIGINAL, script IG_CreateNavigationBarItems);
if l_result <> SY_NOERR then
	warning "Procedure trigger registration for CreateDefaultNavButtonMenuStructure failed.";
end if;

The following is the trigger processing procedure that adds the items to the new Navigation pane for the sample integrating application. It adds the Area Page and the Leads list to the navigation.

in integer nLoadMode;
optional in boolean fShowProgress = false;

local CmdSequence nSeq;
local integer nStatus;

{Add Area Page}
nSeq = 1;
nStatus = AddCommandToMenu(IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command Navigation_IGSample of form Command_IG_Sample),
	nSeq,
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command AreaPage_IGSample of form Command_IG_Sample),
	false,
	nLoadMode);

{Add Leads Card List}
nSeq = nSeq + 1;
nStatus = AddCommandToMenu(IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command Navigation_IGSample of form Command_IG_Sample),
	nSeq,
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command ListObj_Leads of form Command_IG_Sample),
	false,
	nLoadMode);


Documentation Feedback