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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to get MainAccountID in MainAccount from CustTrans table in ax 2012?

(0) ShareShare
ReportReport
Posted on by

Hi all.

I want to get MainAccountID in Main Account table from CustTrans table, but I don't find relationship of them or using method to get it. help me. thank you so much.

*This post is locked for comments

I have the same question (0)
  • Brandon Wiese Profile Picture
    17,790 on at

    Your question does not make much sense.

    Each CustTrans record will have a Voucher, but each voucher in the general ledger will typically debit/credit multiple and sometimes many main accounts.  For example, if the CustTrans record represents a customer invoice from a sales orders, the voucher will hit your A/R Trade main account for customer balance, one or more Revenue main account, one or more Inventory balance main accounts, as well as Cost of goods (Sales consumption) main accounts, and potentially more.

    So, which main account is it you want?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Brandon Wiese

    thank you for your attention to my question. But I mean, I want to get MainAccountId in Main Account table from Custtrans table by code, because I want to select all customer in Custtrans table where MainAccountID equals parameter MainAccountID.

    My English is bad. So If you don't understand, please tell me.

  • Community Member Profile Picture
    on at

    Hi!

    Look for example query CustBalance_CN 

    You can create a query for your condition use it 

  • MbokJamu Profile Picture
    140 on at

    You can get main account from CustTrans Posting Profile join with CustLedgerAccounts

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dekion Profile Picture

dekion 4

#2
Virginia99 Profile Picture

Virginia99 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans