web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Peter John Profile Picture
    288 on at
    RE: Accounting Distribution table Relations ?

    Thanks, Chaitanya

    Regards,

    John

  • Peter John Profile Picture
    288 on at
    RE: Accounting Distribution table Relations ?

    Thanks, Chaitanya

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Accounting Distribution table Relations ?

    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.

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Accounting Distribution table Relations ?

    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));
        }
    }

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

Responsible AI policies

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

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans