Open and closing

The Initialize procedure is used to prepare a list to display data. It performs the following:

 

The following is the Initialize procedure for the Contact History list in the sample integrating application.

inout ListObjState list_object;
out 'Window Title' sWdwTitle;
out integer nStatus;

default window to State;

{Open the Contact History list object}
open form ListObj_ContactHistoryTrx;

clear table(list_object:'Table Reference');

{Set the list type}
list_object:ListType = LISTTYPE_TRX;

{Set the window title and header title}
sWdwTitle = "Contact History";
field(list_object:HeaderTextRef) = "Contact History";
'Window Title' = "Contact History";

'(L) TrxString' = "Customers";
'(L) LoadingString' = getmsg(7086);{"Loading"}

{Fill the Options drop-down list}
call FillListOptionsDDL of form ListObj_ContactHistoryTrx, list_object;

{Clear date and find fields}
clear '(L) TempTableStartDate', '(L) TempTableEndDate', '(L) TempTableHasHistory', list_object:'Find Text';

nStatus = OKAY;

{Register the commands used for the Action Pane}
call RegisterCommands of form ListObj_ContactHistoryTrx, list_object;

{For transaction lists, set the default action}
list_object:DefaultAction = DEFAULT_ACTION;

When the user closes the list or displays another list, the Close procedure for the list is run. This procedure must perform any clean-up actions for the list, such as closing the list object form, or removing data from temporary tables used for the list. The following is the Close procedure for the Contact History list in the sample integrating application.

inout ListObjState list_object;

list_object:IsCreated = false;
close form ListObj_ContactHistoryTrx;


Documentation Feedback