web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Get Main Account with Financial Dimension from Ledger Dimension (LedgerJouranlACType::Bank) in LedgerJournalTrans Table

(0) ShareShare
ReportReport
Posted on by 202

Dear Experts,

I want to ask some question about getting main account from ledger dimension with LedgerJournalACType::Bank. here's the explanation.

i have write some code that can get main account from ledger dimension.

if (ledgerJournalTrans.OffsetAccountType == LedgerJournalACType::Ledger)
{
    info(strFmt('Ledger Dimension : %1', DimensionStorage::GetMainAccountFromLedgerDimension(ledgerJournalTrans.OffsetLedgerDimension).Name;
info(strFmt('Name : %1', DimensionAttributeValueCombination::find(ledgerJournalTrans.OffsetLedgerDimension).DisplayValue)); }

with the code above, i can get the main account alongside with the financial dimension. but, if i want to get the main account from ledger dimension with LedgerJournalACType::Bank, it's not showing any result.

if (ledgerJournalTrans.OffsetAccountType == LedgerJournalACType::Bank)
{
    info(strFmt('Ledger Dimension : %1', DimensionStorage::GetMainAccountFromLedgerDimension(ledgerJournalTrans.OffsetLedgerDimension).Name;
info(strFmt('Name : %1', DimensionAttributeValueCombination::find(ledgerJournalTrans.OffsetLedgerDimension).DisplayValue)); }

can someone suggest me what i can try o solve this problem?

i appreciate any kind of answer.

Regards,

Chaidir Ali Assegaf

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    zeeshan.shaikh Profile Picture
    683 on at
    RE: Get Main Account with Financial Dimension from Ledger Dimension (LedgerJouranlACType::Bank) in LedgerJournalTrans Table

    Hi Chaidir,

    You can use below code for Bank ledger type to get the Bank account

    if (ledgerJournalTrans.OffsetAccountType == LedgerJournalACType::Bank)
    
    {
    
        info(strFmt('Name : %1', DimensionAttributeValueCombination::getDisplayValue(ledgerJournalTrans.OffsetLedgerDimension)));
    
    }

    This will give you bank account then you can use Bank Account table to get the bank complete name.

    Regards,

    Ali Zeeshan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

#2
NNaumenko Profile Picture

NNaumenko 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans