Create an event for OnPostRun for form events
[FormEventHandler(formStr(EntAssetWorkOrderTableCreate), FormEventType::PostRun)]
public static void EntAssetWorkOrderTableCreate_OnPostRun(xFormRun sender, FormEventArgs e)
{
FormStringControl formCtrl = sender.design().controlName(formControlStr(EntAssetWorkOrderTableCreate, TRGEntAssetRequestObjectTableView_RequestId));
formCtrl.registerOverrideMethod(methodStr(FormStringControl, jumpRef), methodStr(EntAssetRequestTableCreateForm_Extension, jumpRefRequestId), sender);
}
Create extension class for the form methods and add jumprefMethod in it:
[ ExtensionOf(formstr(EntAssetWorkOrderTableCreate)) ]
final class TRGEntAssetWorkOrderTableCreateForm_Extension
{
public void TRGJumpRefRequestId(FormControl _formControl)
{
MenuFunction menuFunction;
EntAssetRequestTable entAssetRequestTable;
TRGEntAssetRequestObjectTableView entAssetRequestObjectTableView;
Args args = new Args();
FormDataSource fds = _formControl.formRun().dataSource(formDataSourceStr(EntAssetWorkOrderTableCreate, TRGEntAssetRequestObjectTableView));
entAssetRequestObjectTableView = fds.cursor();
if (_formControl)
{
entAssetRequestTable = EntAssetRequestTable::find(entAssetRequestObjectTableView.RequestId);
}
args.record(entAssetRequestTable);
args.lookupRecord(entAssetRequestTable);
menuFunction = new MenuFunction(menuitemDisplayStr(EntAssetRequestTable), MenuItemType::Display);
menuFunction.run(args);
}
}