Wednesday, March 1, 2017

How Segmented entry control works on form in AX 2012

HI Folks,

Today my post is about new concept how segmented entry control works in ax 2012

create table and form as below screenshot and follow the below code





public class FormRun extends ObjectRun
{
    DimensionDynamicAccountController ledgerDimensionAccountController;
}
public void init()
{
    super();
    ledgerDimensionAccountController = DimensionDynamicAccountController::construct(SK_Ledger_ds, fieldstr(SK_Ledger,LedgerDimension),
                                                                                    fieldstr(SK_Ledger,LedgerjournalActype));

}
public void jumpRef()
{
    ledgerDimensionAccountController.jumpRef();
}
public void loadAutoCompleteData(LoadAutoCompleteDataEventArgs _e)
{
    super(_e);
    ledgerDimensionAccountController.loadAutoCompleteData(_e);
}
public void loadSegments()
{
    super();

        ledgerDimensionAccountController.parmControl(this);
        ledgerDimensionAccountController.loadSegments();

}
public void lookup()
{
     switch(Sk_Ledger.LedgerJournalACType)
        {
            case LedgerJournalACType::Cust:
                CustTable::lookupCustomer(this);
                break;
            case LedgerJournalACType::Vend:
                VendTable::lookupVendor(this);
                break;
            default:
                super();
                break;
        }
}
public Common resolveReference()
{
    Common ret;

    ret = super();

    ret = ledgerDimensionAccountController.resolveReference();
    return ret;
}
public void segmentValueChanged(SegmentValueChangedEventArgs _e)
{
    super(_e);
    ledgerDimensionAccountController.segmentValueChanged(_e);
}
public boolean validate()
{
    boolean isValid;

    isValid = super();
    isValid = ledgerDimensionAccountController.validate() && isValid;

    return isValid;
}

Happy Daxing !!!



1 comment:

Export a copy of the standard user acceptance testing (UAT) database

 Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...