How to use jumpRef() / how to add go to main table or view details
Today i have add "go to main table" in my form field , in ax 2009 , this is also use full for AX 2012 user also becouse code are same, coding are same.just like view details in ax 2012
Example : i have created a form where i take item id and item name, qty.
now i have to add go to main table/view details on item id .
1. go to your created form,
2. select your form data source,
3. select field that you want to add this.
4. override jumpRef() mathod.
5. write this code according to your requirement.
public void jumpRef()
{
inventtable inventtable;
args args;
menufunction mf;
;
// rackinquerytable.ItemId this is your table item id where you want to put this technique.//
// first need to match item id in both table//
inventtable = inventtable::find(rackinquerytable.ItemId);
if(!inventtable)
{
return ;
}
args = new args();
args.caller(element);
args.record(inventtable);
mf = new menufunction(menuitemdisplaystr(inventtable),menuitemtype::Display);
mf.run(args);
}
Thanks
Akshay
No comments:
Post a Comment