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
This was originally posted here.
*This post is locked for comments