Table access

The syTrxList form in the Dynamics.dic dictionary must be able to access the main table used for your transaction list. A reference to the main table for the transaction list provides this access. You create this reference using a global procedure for your integration. For example, the following is the procedure in the sample integrating application that creates a reference to the ContactHistoryTrxTemp table for the Contact History list.

Procedure name: AssignTableRef_ContactHistoryList


if isopen(form syTrxList) then
	assign ListObjState:'Table Reference' of window TrxList of form syTrxList as reference to table ContactHistoryTrxTemp;
end if;

The procedure that assigns the table reference must be called each time the transaction list is opened. This in done using a trigger that will call the AssignTableRef procedure you just created. The procedure trigger is created in the RegisterTableRefTrigger procedure that is part of your transaction list form. The following is the RegisterTableRefTrigger procedure for the Contact History list.

out integer nTriggerTag;

local integer nStatus;

nStatus = Trigger_RegisterFocus(anonymous('Attach Button' of window TrxList of form syTrxList), TRIGGER_FOCUS_CHANGE, TRIGGER_AFTER_ORIGINAL, script AssignTableRef_ContactHistoryList, nTriggerTag);
if nStatus <> SY_NOERR then
	error "Could not register the RegisterTableRefTrigger for the Contact History list";
end if;

The tag for this trigger is automatically saved so that this trigger can be unregistered when the list is closed or another list is displayed.

Documentation Feedback