Hi,
I have a lookup that has some custom logic in the OnLookup event handler. I need to execute it based on a condition, otherwise I need to call the base lookup logic. What I'm having trouble with is calling the base lookup since I cannot use the super() method in the event handler. Here's what I'm trying to achieve:
if(someCondition)
{
//execute custom lookup logic
}
else
{
//execute the base lookup code
}
You wrote it in the ax form but I guess you are using d365fo
You need to cancel Super.
FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs; ce.CancelSuperCall();
Alternatively, you can override the lookup with CoC