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

Call custom service with JSON body in D365FO

Call Custom Service with JSON Body in D365FO Call Custom Service with JSON Body in D365FO FileUploadTemporarySt...