[FormControlEventHandler(formControlStr(EcoResProductCreate, SAZBaseItemIdentification_ItemId), FormControlEventType::Lookup)] public static void SAZBaseItemIdentification_ItemId_OnLookup(FormControl sender, FormControlEventArgs e) { SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), sender); Query query = new Query(); QueryBuildDataSource qbdsInventTable = query.addDataSource(tableNum(InventTable)); qbdsInventTable = qbdsInventTable.addDataSource(tableNum(EcoResProductLifecycleState)); qbdsInventTable.joinMode(JoinMode::InnerJoin); qbdsInventTable.relations(true); qbdsInventTable.addRange(fieldNum(EcoResProductLifecycleState, SAZIsCopyItemSourceStatus)).value(enum2Str(NoYes::Yes)); sysTableLookup.addLookupfield(fieldNum(InventTable, ItemId)); sysTableLookup.addLookupMethod(tableMethodStr(InventTable, itemName)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs; ce.CancelSuperCall(); }
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
Monday, April 12, 2021
Form control lookup event handler in D365fo
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment