7 Jan 2017

Get Mainaccount from ledgerDimension through X++ in AX 2012

public void Mainaccount(LedgerDimensionDefaultAccount   _LedgerDimensionDefaultAccount)
{

    DimensionAttributeValueCombination combination;
    MainAccount                         mainAccount;
    ;
    select DisplayValue from combination
                            where combination.recId == _LedgerDimensionDefaultAccount;

    select * from mainAccount where mainAccount.RecId == combination.MainAccount;
   Return mainAccount.MainAccountId;

}

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...