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 :
Microsoft Dynamics AX (Archived)

relationship beween Vendtable & MainAccount

(0) ShareShare
ReportReport
Posted on by 916

Hello,

Is there a way to get MainAccountId and posting profile from vendTable? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Alex,

    The vendors are typically linked to vendor groups which are referred to in the vendor posting profiles in order to determine the summary payables main accounts.

    Please note that also a vendor specific relationship between a vendor account and a main account or - alternatively - a generic relationship for all vendors to a main account can be setup in the vendor posting profile.

    So, probably have a look at the AP posting profiles to identify this link.

    Hope this helps,

    Ludwig

  • ALAhmed Profile Picture
    916 on at

    Thank you for the reply,

    I try this but code but i can't get mainaccount

    PostingProfile  = VendLedgerAccounts::find(VendParameters::find().PostingProfile,

                                                       TableGroupAll::GroupId,

                                                       custVendTable.GroupId).PostingProfile;

    mAccountId  = VendLedgerAccounts::find(VendParameters::find().PostingProfile,

                                                       TableGroupAll::GroupId,

    custVendTable.GroupId).PurchasingOffsetLedgerDimension;

    MainAcc = MainAccount::find(DimensionStorage::getLedgerDefaultAccountFromLedgerDim(mAccountId)).MainAccountId;

  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    Hi Alex,

    Try this:

    mAccountId  = VendLedgerAccounts::find(VendParameters::find().PostingProfile,
                                           TableGroupAll::GroupId,
                                           custVendTable.GroupId).PurchasingOffsetLedgerDimension;
    MainAcc = DimensionAttributeValueCombination::getMainAccountFromLedgerDimension(mAccountId);


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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans