Go to the Main Table Form is a feature of Dynamics AX, which allows users to jump to the main record just by right-clicking on the field and selecting the Go to the Main Table Form option. It is based on table relations and is available for those controls whose data fields have foreign key relationships with other tables.
but,sometimes we are need to using (display/edit) methods to display on the gird.

such as  Form path :InventQurantineOrder) - > Grid - >purchId()(dsplay method)

1)OverLoad jumpref system reference method before

Customization to go to the main table form_sed

2)OverLoad jumpRef method after

Customization to go to the main table form_sed_02

 

X++ Code as below:

Customization to go to the main table form_sed_03Customization to go to the main table form_sed_04go to the main table form
public void jumpRef()
{
//Add by Jimmy on DEC.3th 2010
FormRun fr;
FormDataSource fds;
Args args = new Args();
PurchId purchId;
PurchTable CurPurchTable
;
super();
purchId = InventQuarantineOrder.PurchId();
CurPurchTable = PurchTable::find(purchId);//current purchase order record

args.name(formstr(PurchTable));
fr = ClassFactory.formRunClass(args);
fr.init();
fr.run();
fr.dataSource().findRecord(CurPurchTable);//jump reference for current PO record
fr.detach();
}