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

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

*This post is locked for comments

  • Verified answer
    Chaitanya Golla Profile Picture
    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));
        }
    }
  • Suggested answer
    Chaitanya Golla Profile Picture
    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.

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

    Thanks, Chaitanya

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

    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

Quick Links

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans