Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

need to display main account and name from vendor posting profile

Posted on by 5,885

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!

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: need to display main account and name from vendor posting profile

    yes, thanks

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,083 on at
    RE: need to display main account and name from vendor posting profile

    Hi @rp@n,

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

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: need to display main account and name from vendor posting profile

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

    is it correct?

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,083 on at
    RE: need to display main account and name from vendor posting profile

    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
    @rp@n 5,885 on at
    RE: need to display main account and name from vendor posting profile

    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

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: need to display main account and name from vendor posting profile

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

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,083 on at
    RE: need to display main account and name from vendor posting profile

    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?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans