ledgerDim = DimensionStorage::getDynamicAccount( ‘US-001’, LedgerJournalACType::Cust);//Account offsetLedgerDim = DimensionStorage::getDynamicAccount( ‘USMF OPER’, LedgerJournalACType::Bank);//OffsetAccountIn D365 this Microsoft provide LedgerDynamicAccountHelper. Code snippet is here
ledgerDim = LedgerDynamicAccountHelper: :getDynamicAccountFromAccountNumber(‘US-1001’, LedgerJournalACType::Cust); offsetLedgerDim = LedgerDynamicAccountHelper: :getDynamicAccountFromAccountNumber( ‘USMF OPER’, LedgerJournalACType::Bank);Reference http://daxingwitheshant.blogspot.com/2015/04/creating-payment-journal-using-x-in-ax.html