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();
}
}

Asif Huddani's Blog

Hello Friends,

Recently I am working on AX 2012 customization and find new feature which sometimes little confuse.

I am able to customize form by going inside Developer workspace.

Issue is i am able to add and modify and write new contol override method for my customization inside any child form. But if my form is list page form like CustTableListPage, or VendTableListPage then i am able to add buttom but i dont able to override method… so i am lookin on this and finally get answer.. Look at Below…

If you want to use that List Page button only in AX 2012 Client but not in Enterprise Portal then just change button Property “DisplayTarget” and change to “Client”. Now you can override method for that button…

Such a Cool Feature….

Method Override option not available in CustTableListPage

Override Method in CustTable Form

DisplayTarget to client and Override Methods

Check this My post in AX Community.https://community.dynamics.com/product/ax/f/33/p/65449/119002.aspx

View original post

Advertisements