Monday, July 12, 2021

Get Main Account from Ledger Dimension in D365FO using X++



 //Get MainAccountId from LedgerDimension
            LedgerDimensionFacade::getMainAccountFromLedgerDimension(LedgerDimension).MainAccountId;
or      
    MainAccount::findByLedgerDimension(ledgerDimension).MainAccountId;

     //Get Name of MainAccountId from LedgerDimension
        LedgerDimensionFacade::getMainAccountFromLedgerDimension(LedgerDimension).Name;

Keep Daxing!!


No comments:

Post a Comment