Create ledger dimension from main account

From Bank account :  

offsetLedgerDim = DimensionStorage::getDynamicAccount(‘USMF',LedgerJournalACType::Bank);


From Main account :

DimensionDynamicAccount DimensionDynamicAccount;
        DimensionDynamicAccount = 
LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber("000103",
LedgerJournalACType::Ledger);

Likewise the second parameter can be changed to get the ledger dimension from the different account types.

Comments

Popular posts from this blog

Finding unit price of item from trade agreement through code AX X++

Create Sales Line Through Code AX X++ D365 Finance & Operations

Sales order creation from sales quotation through code AX 2012/D365 x++