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

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

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

On clicked event of form button in D365 X++