Quantcast
Channel: Microsoft Dynamics AX
Viewing all articles
Browse latest Browse all 101540

Forum Post: RE: Implementing Jumpref or View Details on a List page

$
0
0
Hi Sohaib. Awesome thanks for that. It was just what I needed. After a bit of experimentation this is what worked... All done in the ListPageInteractionClass //declare in classDeclaration FormStringControl purchidCtrl; public void initialized() { Array fields; FormStringControl ctrl; FormDataSource frmDs; Common currentRecord; FormRun formRun; super(); currentRecord= this.listPage().activeRecord('[MyDataSourceName]'); frmDs = currentRecord.dataSource(); formRun = frmDs.formRun(); purchidCtrl = formRun.control(formRun.controlId("purchId")); purchidCtrl.registerOverrideMethod(methodStr(FormStringControl, jumpRef), methodStr([MyListPageInteractionClass], jumpRefPurch), this); } private void jumpRefPurch(FormControl _formControl) { PurchTable purch; Args args; MenuFunction menuFunction; ; if (purchid.valueStr() != "") { menuFunction = new MenuFunction(menuitemDisplayStr("PurchTable"), MenuItemType::Display); args = new Args(menuFunction.object()); purch = PurchTable::find(purchid.valueStr()); if (purch.RecId != 0) { args.record(purch); menuFunction.run(args); } else { error(strFmt("Purchase order: %1 no longer exists")); } } }

Viewing all articles
Browse latest Browse all 101540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>