Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Ax 7 - Can't handle OnLookup event in non-autodeclarated control of form extension

$
0
0

Hi everybody!!

I need to catch the OnLookup event in a standard control of an extension of form CustTable:

\Forms\CustTable\Design\Tab(Tab)\TabPageDetails(TabPage)\TabHeader(Tab)\TabGeneral(TabPage)\UpperGroup(Group)\Identification(Group)\PersonGroup1(Group)\PersonNameGroup(Group)\PersonNameGroup_LastNamePrefix(Custom)

As you can see, is a field control among others from a Table Group. If you try to handle the OnLookup event of this control:

[FormControlEventHandler(formControlStr(CustTable, PersonNameGroup_LastNamePrefix), FormControlEventType::Modified)]
public static void PersonNameGroup_LastNamePrefix_OnModified(FormControl sender, FormControlEventArgs e)
{
}

Building with this fails, with message "Form control 'PersonNameGroup_LastNamePrefix' is not found in 'CustTable'.".

In this same group there are other controls. that don't fail if you try to do the same with them.
I think this issue is due to the Autodeclaration property of the controls (false in PersonNameGroup_LastNamePrefix, but true in the others).

How can I achieve to manage the lookup of this control (or field)? Any ideas?

PS: Environment is Ax7 PU9


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>