web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Goshoom. NET Dev Blog / DefaultAction in lookup form

DefaultAction in lookup form

Martin Dráb Profile Picture Martin Dráb 236,570 Most Valuable Professional

Dynamics AX 2009 allows to define an action to run when double click occurs in a form grid. The typical usage is in list pages, where a “normal” form is open on double click.

The grid must be non-editable and the DefaultAction points to a button on the form (the button can be even hidden).

Imaging you want to create a lookup form, which is not closed automatically when a record is selected. Instead, it is closed by double click (it allows to perform some additional action in the lookup). If you block the form from closing in the close() method only, the standard action for lookup closing handles the click on a record and the DefaultAction (respectivelly the MouseDblClick event) is never run.

The only thing to do is to garantee that super() in closeSelect() is not called in that moment – DefaultAction begins to work as expected.


This was originally posted here.

Comments

*This post is locked for comments