Adding to Setup Checklist

To add items to the Setup Checklist, you will create commands for the items to be displayed, register a trigger for the procedure that adds items to the Setup Checklist, and write a trigger processing procedure to add the items.

Creating commands

Create a command or command list for each item or category you want to add to the Setup Checklist. If you already created commands that you added to the Setup menu, you can re-use those same commands for the Setup Checklist.

Registering the trigger

To add items to the Setup Checklist, you must register a procedure trigger for the CreateSetupChecklist procedure in Microsoft Dynamics GP. This procedure is run each time Microsoft Dynamics GP is launched. The following example from the sample integrating application shows the registration for this trigger. When the trigger is activated, the IG_CreateSetupChecklistItems procedure is run.

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

Trigger processing procedure

Before the processing procedure adds Setup Checklist items, it must first verify that the items for the integration haven’t already been added. If the items haven’t been added, the AddSetupChecklistItem() function is used to add them. You can also use the FindSetupChecklistItem() function to retrieve the location of existing items in the Setup Checklist. This is useful when adding items to specific locations in the tree.

The following is the trigger processing procedure that adds Setup Checklist items for the sample integrating application. Notice how a range is set up to determine whether Setup Checklist items have been added previously. If they haven’t, items are added. The FindSetupChecklistItem() function is used to locate the “Customer” item in the Sales category of the tree. The item is added in the position following the Customer item.

local integer status;
local integer seq;

{Examine whether the Setup Checklist items have already been added}
range clear table sySetupChecklistMstr;
range table sySetupChecklistMstr where physicalname(CmdDictID of table sySetupChecklistMstr) + "=" + str(IG_PROD_ID);
get first table sySetupChecklistMstr;

if err() = EOF then

	{Find the Customers item}
	seq = FindSetupChecklistItem(DYNAMICS,
		resourceid(form Command_Sales),
		resourceid(command CL_Sales_Setup of form Command_Sales),
		DYNAMICS,
		resourceid(form Command_Sales),
		resourceid(command RM_Customer_Maintenance of form Command_Sales)) of form sySetupChecklistObj;

	{Add the new item after the Customers item}
	seq = seq + 1;

	{Add the Contact History Setup item}
	status = AddSetupChecklistItem(DYNAMICS,
		resourceid(form Command_Sales),
		resourceid(command CL_Sales_Setup of form Command_Sales),
		seq,
		IG_PROD_ID,
		resourceid(form Command_IG_Sample),
		resourceid(command IG_Contact_History_Setup of form Command_IG_Sample),
		technicalname(window Contact_History_Setup of form IG_Contact_History_Setup),
		false,
		"IG_CHM_NAME",
		"ContactHistorySetup.htm") of form sySetupChecklistObj;
end if;

Refer to the description of the AddSetupChecklistItem() for more examples that show how to add items to the Setup Checklist.


Documentation Feedback