GotoMainTable Jumpref override method in Ax 2009

//Override the Jumpref method on the Form Datasource- field or Control in form where you need “Go to the  MAIN TABLE FORM “

public void jumpRef()
{
Args            args;
MenuFunction    menuFunction;
;
args = new Args();
menuFunction = new MenuFunction(menuitemDisplayStr(“FORM NAME”), MenuItemType::Display);
args = new Args(menuFunction.object());
args.caller(element);
menuFunction.run(args);
}

//Jumpref method –  Go to that particular journal ID

public void jumpRef()
{
LedgerJournalTable       _LedgerJournalTable;
Args args;
MenuFunction menuFunction;
;
breakpoint;
_LedgerJournalTable = LedgerJournalTable::find(this.text());
if(!_LedgerJournalTable)
return;
args = new Args();
args.caller(element);
args.record(_LedgerJournalTable);
menuFunction = new MenuFunction(menuitemdisplaystr(LedgerJournalTable),MenuItemType::Display);
menuFunction.run(args);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s