Langsung ke konten utama

Postingan

Menampilkan postingan dari Oktober, 2017

To Add a Lookup Form to a StringEdit Control in AX 2012

In the AOT, expand  Forms , expand the form, expand  Designs , right-click  Design , click  New Control , and then click  StringEdit . A  StringEdit control is added to the form Expand the control, right-click  Methods , click  Override method , and then click  lookup . The  lookup  method opens in the code editor. add this example to lookup methods public void lookup() { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(custTable), this); sysTableLookup.addLookupField(fieldNum(CustTable, AccountNum)); sysTableLookup.addLookupField(fieldNum(CustTable, CustGroup)); queryBuildDataSource = query.addDataSource(tableNum(CustTable)); queryBuildRange = queryBuildDataSource.addRange(fieldNum(CustTable, CustGroup)); queryBuildRange.value('40'); sysTableLookup.parmQuery(query); sysTableLookup.performFormLo