What are the relations between Purch table and Accounting Distribution table?
*This post is locked for comments
Thanks, Chaitanya
Regards,
John
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Syed Haris Shah 9
Martin Dráb 2 Most Valuable Professional
Community Member 2