Skip to content

Instantly share code, notes, and snippets.

@ztirom

ztirom/dialog Secret

Last active April 22, 2016 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztirom/4df99ed0d05ca478e27d17a86a20d281 to your computer and use it in GitHub Desktop.
Save ztirom/4df99ed0d05ca478e27d17a86a20d281 to your computer and use it in GitHub Desktop.
AX2012 Custom Lookup on a Dialog
protected Object dialog()
{
Dialog dialog;
FormStringControl control;
DialogField fieldLookup;
dialog = super();
// Dialog Title
dialog.caption("Aif Adapter");
// Field - EDT, Label
fieldLookup = dialog.addField(extendedTypeStr(AifAdapterName), "AifAdapterName:");
// Get control
control = fieldLookup.control();
// Override lookup method
control.registerOverrideMethod(methodStr(FormStringControl, lookup),
methodStr(DialogLookup /* Class name */,
lookup /* Method name*/), this);
return dialog;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment