Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Monday, December 9, 2013

Data filtration in dialog box In Microsoft Dynamics AX

public class CustAmountCalculation extends RunBase
{
    DialogField fieldAccount;
    CustAccount custAccount;

}

    public Object dialog()
{

    Dialog dialog;
    DialogGroup groupCustomer;
    dialog = super();
    fieldAccount = dialog.addField(extendedTypeStr(custAccount), "CustomerAccount");
    return dialog;
}

    public boolean getFromDialog()
{
    custAccount = fieldAccount.value();
    return super();
}

    public container pack()
{
    return conNull();
}


    public void run()
{
    CustTable custTable;
    CustTrans custTrans;
    ;

    select sum(AmountMST) from custTrans where custTrans.AccountNum == custAccount;
    info("You have enetered customer information");
    info(strfmt("Account: %1", custAccount));
    info(strFmt("Amount: %1", custTrans.AmountMST));
}

    public boolean unpack(container _packedClass)
{
    return true;
}

    public static void main(Args _args)
{
    CustAmountCalculation custAmountCalculation = new CustAmountCalculation();
    if (CustAmountCalculation.prompt())
    {
        CustAmountCalculation.run();
    }
}

http://stackoverflow.com/questions/14501722/how-to-filter-lookup-values-on-a-dialogfield-in-report-dialog-based-on-another-d/20472542#

No comments:

Post a Comment

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...