Adding to the Action Pane

The Action Pane for a list is initially built the first time the list is opened. This is the default layout for the Action Pane. Users can customize the Action Pane for the additional list views they create. How you add actions to the Action Pane depends on whether you are adding actions to your own list or to an existing Microsoft Dynamics GP list.

The data for each action is stored in the sy07240 table in the DYNAMICS database. As you add actions, you may need to reset the actions that appear for a list. To do this, you will need to delete the appropriate rows from the sy07240 table.

Adding actions and groups to your list

If you are creating your own list, you will add items to the Action Pane using one of the procedures provided for the list. For card lists, this is described in Action Pane. For transaction lists, this is described in Action Pane.

Adding actions and groups to a Dynamics GP list

If you are adding your actions to a Microsoft Dynamics GP list, you will register a trigger for the TRIGGER_LoadRibbonData procedure of form syListObj. The trigger processing procedure will add your actions to the Action Pane for a specific list.

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

l_result = Trigger_RegisterProcedure(script TRIGGER_LoadRibbonData of form syListObj, TRIGGER_AFTER_ORIGINAL, script IG_AddCustomerActions);
if l_result <> SY_NOERR then
	warning "Procedure trigger registration failed.";
end if;

The trigger processing procedure that adds items to the Action Pane has a list object variable passed into it. You will use this object to determine which list is being displayed, and whether you need to add your actions to the list’s Action Pane. To determine which list is being displayed, examine the list object’s ListID component. It will correspond to one of the following constants:

[spacer]

Constant

List

Form

LISTID_ACCOUNTS

Accounts card list

ListObj_Accounts

LISTID_ACCOUNTTRX

Accounts transaction list

ListObj_AccountTrx

LISTID_ALLPURCHASINGTRX

Purchasing transaction list (including all POP and PM transactions)

ListObj_PurchasingTrx

LISTID_ALLSALESTRX

Sales transaction list (including all SOP, RM, and IVC transactions)

ListObj_SalesTrx

LISTID_CHECKBOOKS

Checkbooks card list

ListObj_Checkbooks

LISTID_CUSTOMERS

Customers card list

ListObj_Customers

LISTID_EMPLOYEES

Employees card list

ListObj_Employees

LISTID_GLBATCHES

General Ledger batches card list

ListObj_Batches

LISTID_ITEMS

Items card list

ListObj_Items

LISTID_ITEMTRX

Items transaction list

ListObj_ItemsTrx

LISTID_IVCTRX

Invoicing transaction list

ListObj_SalesTrx

LISTID_PMBATCHES

Payables batches card list

ListObj_Batches

LISTID_PMTRX

Payables transaction list

ListObj_PurchasingTrx

LISTID_POPTRX

Purchase order transaction list

ListObj_PurchasingTrx

LISTID_PROSPECTS

Prospects card list

ListObj_Prospects

LISTID_REPORTS_ALL

All Reports report list

syReportList

LISTID_REPORTS_COMPANY

Company Report report list

syReportList

LISTID_REPORTS_CUSTOM

Custom Report report list

syReportList

LISTID_REPORTS_FINANCIAL

Financial report list

syReportList

LISTID_REPORTS_INVENTORY

Inventory report list

syReportList

LISTID_REPORTS_PAYROLL

Payroll report list

syReportList

LISTID_REPORTS_PURCHASING

Purchasing report list

syReportList

LISTID_REPORTS_SALES

Sales report list

syReportList

LISTID_REPORTS_SMARTLIST

SmartList Favorites report list

syReportList

LISTID_REPORTS_SYSTEM

System report list

syReportList

LISTID_RMBATCHES

Receivables batches card list

ListObj_Batches

LISTID_RMTRX

Receivables transaction list

ListObj_SalesTrx

LISTID_SALESPEOPLE

Salespeople card list

ListObj_Salesperson

LISTID_SOPTRX

Sales order transaction list

ListObj_SalesTrx

LISTID_VENDORS

Vendors card list

ListObj_Vendors


The following example is the trigger processing procedure for the sample integrating application that adds the Contact History action to the Customer card list. Notice how it verifies that the Customer list is being displayed, and locates the position of the item to be added.

inout ListObjState list_object;

local integer seq;
local integer nStatus;
local boolean exists;

{Is this the Customers list?}
if list_object:ListID = LISTID_CUSTOMERS then

	{Does the Contact History command exist for the list? If not, add it.}
	exists = ExistsAsAction(IG_PROD_ID, 
		resourceid(form Command_IG_Sample),
		resourceid(command IG_Contact_History of form Command_IG_Sample), 
		DYNAMICS,
		LISTID_CUSTOMERS,
		LIST_PRIMARYVIEWID) of form syListViewCmdBarObj;

	if exists = false then

		{Find the Remove Hold command}
		seq = FindCommandInCmdList(DYNAMICS,
			LISTID_CUSTOMERS,
			LIST_PRIMARYVIEWID,
			DYNAMICS,
			resourceid(form ListObj_Customers),
			resourceid(command CL_ModifyGroup of form ListObj_Customers),
			DYNAMICS,
			resourceid(form ListObj_Customers),
			resourceid(command Remove_Hold of form ListObj_Customers)) of form syListViewCmdBarObj;

		{If the command was found, add the Contact History command}
		if seq <> 0 then
			seq = seq + 1;
			nStatus = AddCommand(DYNAMICS,
				LISTID_CUSTOMERS,
				LIST_PRIMARYVIEWID,
				DYNAMICS,
				resourceid(form ListObj_Customers),
				resourceid(command CL_ModifyGroup of form ListObj_Customers),
				seq, 
				IG_PROD_ID,
				resourceid(form Command_IG_Sample),
				resourceid(command IG_Contact_History of form Command_IG_Sample), 
				LISTACTIONPRIORITY_SECONDARY,
				LISTACTIONBTNSIZE_SMALL,
				"" {caption},
				true {visible},
				true {clone for all list view}) of form syListViewCmdBarObj;
		end if;
	end if;

	{Register the Contact History action}
	List_RegisterAction(list_object, command IG_Contact_History of form Command_IG_Sample, LISTCMDTYPE_SINGLESELECT, ACTION_CONTACT_HISTORY_ENCODED) of form syListObj;
end if;


Documentation Feedback