Wednesday, June 29, 2011

Implement "Go to the Main Table" on the field

Hi,
To implement the "Go to the Main Table" functionality on any lookup field :

Override the jumpRef() method of the control,

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

Thanks.

No comments:

Post a Comment