Selective lookups in dialogs

Hey people,
Often we create lots of dialogs in our development for user input and many times we face situations where we need to populate lookups in one field depending on the data in other fields.
In form it is very easy to override the lookup method of the control and write the suitable logic to implement the lookup. But what about dialogs, how do we create selective lookups in dialogs…
Here is a sample class developed on AX 4.0 SP2 platform illustrating the selective lookups creation in dialogs.
The main points to remember are…
  • The field in the dialog is a FormStringControl type and not DialogField type
  • The class extends from RunBase class
  • We need to enable the control method over loading option (Can be viewed in the dialogPostRun method in the sample class in the above link)
  • We need to write a lookup method with the name <ControlName>_lookup and write the lookup logic in this method

One thought on “Selective lookups in dialogs

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s