Friday, May 20, 2022

Create offset ledger dimension using mainaccount id and defaultdimension in D365FO

Hi All,
In this blog we will learn how to create ledger dimension using main account and default dimension RecId.  


X++ Code


public static RecId getLedgerDimensionFromDefaultDimension(MainAccountNum _mainAccountId,     RecId _defaultDimension)

    {
        MainAccount     mainaccount = MainAccount::findByMainAccountId(_mainAccountId);
        RecId           ledgerddimension;
        ledgerddimension =     LedgerDimensionFacade::serviceCreateLedgerDimension(LedgerDefaultAccountHelper::getDefaultAccountFromMainAccountId(_mainAccountId), _defaultDimension);

        return ledgerddimension;

    }



Regards,

Vijay Yelmame

vijay.yelmame@2019@gmail.com



No comments:

Post a Comment

How to Post Partial Product Receipt in D365FO Using X++ Code

How to Post Partial Product Receipt in D365FO Using X++ Code How to Post Partial Product Receipt in D365FO Using X++...