AX 2012 Override method of ActionTab buttons for ListPage Forms like CustTableListPage
On the form button
void clicked()
{
MenuFunction mf;
args args = new Args();
;
args.record(ProdTable);
mf = new menufunction(identifierstr(test), MenuItemType::Action);
mf.run(args);
}
Create a class Test
class Test
{
ProdTable prTable;
}
public static void main(Args args)
{
Test t;
Common record;
FormDataSource recordDataSource;
;
record = args.record();
recordDataSource = record.dataSource();
t = new Test();
t.prodTable(record);
}
private void prodTable(ProdTable _prodTable)
{
FormDataSource recordDataSource;
;
recordDataSource = _prodTable.dataSource();
_prodTable = recordDataSource.getFirst(1);
while (_prodTable)
{
info(strFmt(‘%1’, _prodTable.RecId));
_prodTable = recordDataSource.getNext();
}
}