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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

need to display main account and name from vendor posting profile

(0) ShareShare
ReportReport
Posted on by 56

hi all,

in Vendor posting profile , i need to display main account and name in report. kindly let me know the exact table relation with vendor account.

vendpost.jpg

So, that i can get the main account and name.

please give me more shed on this.

thanks!

I have the same question (0)
  • Verified answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    There is a method VendLedgerAccounts.summaryLedgerDimension which can return your ledger dimension id and you can fetch the main account from it. The method already handles search by account code (All, Group, Table).

    What is your requirement by the way?

  • @rp@n Profile Picture
    56 on at

    I wnats to display the above main account and name in report.

  • @rp@n Profile Picture
    56 on at

    select vendLedgerAccounts
                where vendLedgerAccounts.AccountCode == TableGroupAll::GroupId
                &&    vendLedgerAccounts.Num         == vendGroup;
    
                if(vendLedgerAccounts)
                {
                    ledgerDimension = vendLedgerAccounts.SummaryLedgerDimension;                 
                }

    here i got the ledger dimension. Now i need the main account and name to display in report.

    Kindly let me know the exact relation, so that i can get the value of main account

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    In this case use method mentioned above.

    Main account can be fetched by methods mentioned in  community.dynamics.com/.../how-to-get-mainaccount-name-from-ledger-dimension-ax-2012

    Main account name can be fetched from MainAccount table by MainAccount value.

  • @rp@n Profile Picture
    56 on at

    mainAccount     = MainAccount::findByLedgerDimension(ledgerDimension).MainAccountId;
    mainAccountName = MainAccount::findByLedgerDimension(ledgerDimension).Name;
    

    is it correct?

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    Yes, it's correct and ledgerDimension should be removed by method VendLedgerAccounts.summaryLedgerDimension.

  • @rp@n Profile Picture
    56 on at

    yes, thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 591 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans