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
2)OverLoad jumpRef method after
X++ Code as below:
go 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();
}