Notifications
Announcements
What are the relations between Purch table and Accounting Distribution table?
*This post is locked for comments
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)); } }
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
TAHER Mehdi 3
Martin Dráb 2 Most Valuable Professional
Nakul 2