Sunny Shukla
Sunny Shukla

Reputation: 565

Dimension field in AX 2009 report dialog?

Under ax 2009 my requirement is to open a dialog box when I opens a report and it should show a drop down. So currently my drop down is SiteId from InventSite table. As show in code below.

public class ReportRun extends ObjectRun
{

    //Dialog
    DialogField dfSiteName;

    //Range
    InventSiteId siteName;

}

public boolean getFromDialog()
{
    ;

    siteName = dfSiteName.value();


    return true;
}

public Object dialog(Object _dialog)
{
    DialogRunBase dialog;
    FormDateControl siteNameControl;

    ;
    dialog = super(_dialog);
    dialog.caption("Sales Overview Range Dialog");
    dialog.addGroup("Selec Range");
    dfSiteName = dialog.addField(typeid(InventSiteId),"Site","Select Range");

    siteNameControl = dfSiteName.control();
    siteNameControl.mandatory(true);

    return dialog;
}

Everything is working fine with this code. Now instead drop down of SiteId from InventSite table in dialog box I want drop down of Dimension[1] from InventSite table in dialog box. I am not able to do that. Please guide me on this.

Upvotes: 0

Views: 712

Answers (1)

Jonathan Bravetti
Jonathan Bravetti

Reputation: 2236

If you code work fine and you want to add only the Dimension[1] from inventSite table go to AOT\Data Dictionary\Tables\InventSite\Field Groups\AutoLookup here you there you will see SiteId and Name fields. You need to add new field then go to properties of this new field and select in property DataField the field that you need.

If you add this new field will be visible in all lookups for InventSiteId edt.

Upvotes: 0

Related Questions