Thursday, 25 August 2016

filtering lookups in a dialog in SSRS Reports Ax 2012

filtering lookups in a dialog.

You have to override the corresponding lookup method in the UI builder (using registerOverrideMethod()) and filter the query of the lookup.
This is how you can register a lookup override for a data contract field:

public void postBuild()
{
    DialogField df;
   
    super();
   
    df = this.bindInfo().getDialogField(
            this.dataContractObject(),
            methodStr(MyContract, parmMyValue));

    df.registerOverrideMethod(
          methodStr(FormStringControl, lookup),
          methodStr(MyUiBuilder, lookupMyValue), // Your lookup method
          this);  
}

No comments:

Post a Comment