Hello,
I am quite new (still) on D365.
I know that is possible to override forms lookup methods using event handlers. But, what happens when different forms call the same lookup defined in one table?
[PreHandlerFor(tableStr(SalesQuotationTable), tableMethodStr(SalesQuotationTable, lookupOpportunityId))] public static void lookupOpportunityId(XppPrePostArgs args) { //Some code }
In this case, i don't see how to get the formcontrol. Usually, overriding a lookup method in form looks like:
[FormControlEventHandler(formControlStr(formName, formControl), FormControlEventType::Lookup)] public static void methodName(FormControl sender, FormControlEventArgs e) { //Some code }
Where i have the sender and a FormControlEventArgs, so i have the control, also i can cancel the double perform lookup.
It is possible to override the lookup in my first scenario? i did not find th way.
Thanks in advance,
Eisenberk.