LocalMacro.CurrentList Question

There is a variable in LedgerBalanceSheetPrint called columnDataList that is getting set to a list of 134 but I can’t find where the 134 is coming from. Where can I find where or how this is getting set? Also, can it be expanded? Axapta 3.0 sp3 SQL2000 Thanks, Rick

Hi Rick, variable columnDataList from class LedgerBalanceSheetPrint, is accessed using accessor methods. Accessor methods in X++ are used to set and get attribute values. If supplied with no parameters this method should return (get) value of attribute, and if supplied with parameter they should set the value. In this case accessor method is parmColumnDataList. This class uses the form LedgerBalanceSheetPrint to get additional information from user. The forms is called in method dialog, which is invoked through method prompt and method main. The form has object of class LedgerBalanceSheetPrint as it’s attribute. It uses methods pack and unpack to get/set last used values in it. And in this methods it calls accessor method (parmColumnDataList) to set/get value of columnDataList attribute of class LedgerBalanceSheetPrint . What do you mean by expanding? If modifying the size of columnDataList attribute, it can. It is container which can hold arbitrary number of objects.

Bojan, Thanks for the reply. I want to increase the columnDataList list from 134 to 150 but can’t find where the 134 is getting set. Where can this be set? Thanks, Rick

I put a breakpoint on the first executable line of the init method in the LedgerBalanceSheetPrint form. Stepping through the code leads to the parmColumnDataList method in the LedgerBalanceSheetPrint class but columnListData already has a size of 134. So the value is getting set before the form is opened. Any information where this is getting set at? Thanks, Rick

Hi Rick, the class LedgerBalanceSheetPrint also uses methods pack and unpack to get/set last used values in it. The values that are packed/unpacked are set using macro CurrentList in classDeclaration method. Variable columnDataList is also listed in this macro, so it gets serialized too.

Bojan, Thank you for the information. It helped. Rick