D365/AX7: Extend Form Control OnLookup Event On Standard Form

Requirement Extend Form Control OnLookup Event On Standard Form Sample Code /// <summary> /// /// </summary> /// <param name=”sender”></param> /// <param name=”e”></param> [FormControlEventHandler(formControlStr(TrvRequisitionDetails, TrvRequisitionTable_ACXSource), FormControlEventType::Lookup)] public static void TrvRequisitionTable_ACXSource_OnLookup(FormControl sender, FormControlEventArgs e) { FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(TrvDestinations), sender); Query query = new Query(); query.addDataSource(tableNum(TrvDestinations)); sysTableLookup.addLookupfield(fieldNum(TrvDestinations,Destination )); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); ce.CancelSuperCall(); … Continue reading D365/AX7: Extend Form Control OnLookup Event On Standard Form