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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Accounting Distribution table Relations ?

(0) ShareShare
ReportReport
Posted on by 288

What are the relations between Purch table and Accounting Distribution table?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Please use the following code/job to get the data and let me know if anything is missing.

    static void AXC_AccountDist(Args _args)
    {
        AccountingDistribution AccountingDistribution;
        PurchTable  purchtable;
        AccountingDistributionTemplate AccountingDistributionTemplate;
        SourceDocumentHeader SourceDocumentHeader;
        SourceDocumentLine SourceDocumentLine;
        CompanyInfo CompanyInfo;
        
        while select AccountingDistribution
            join CompanyInfo
            where AccountingDistribution.AccountingLegalEntity == CompanyInfo.RecId
            join SourceDocumentHeader
            where AccountingDistribution.SourceDocumentHeader == SourceDocumentHeader.RecId
            join SourceDocumentLine
            where AccountingDistribution.SourceDocumentLine == SourceDocumentLine.RecId
            join purchTable 
            where PurchTable.SourceDocumentHeader == SourceDocumentHeader.RecId
            && PurchTable.SourceDocumentLine == SourceDocumentLine.RecId
        {
            info(strfmt("PurchId: %1", purchtable.purchId));
        }
    }
  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Also you can check standard method updateDistribution of class PurchTableType(Called from method updateFromPurchLines on table PurchTable) and method isPartiallyDistributed of table PurchTable for reference.

  • Peter John Profile Picture
    288 on at

    Thanks, Chaitanya

  • Peter John Profile Picture
    288 on at

    Thanks, Chaitanya

    Regards,

    John

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans