Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
We are running AX 2012 R3 and we have an issue with project accounting distributions connected to a purchase order line item after following a very specific set of steps:
This eventually leads to our users posting vendor invoices which have project ids on the lines but no project transaction being generated.
What I found in the code is the class AccountingDistributionProcessor has a delegate which notifies the classAccDistProcessorProjectExtension whenever an accounting distribution is updated. The AccDistProcessorProjectExtension gets the source document lines that were updated and processes each of them. In my case, just one source document line is involved. The AccDistProcessorProjectExtension loops over all of the accounting distributions that are linked to the source document line and tries to add a related ProjectAccountingDistribution record if needed. I noticed as it loops through the accounting distributions, it can add a related project accounting distribution for a variety of reasons (if there's a reference accounting distribution, a parent accounting distribution, a reversed accounting distribution, and a few other scenarios. I can see that the first accounting distribution record which never had a project linked is getting one created from a reversed distribution. This is happening in \Classes\AccDistProcessorProjectExtension#createFromReversedDistribution
This code looks into a map for any accounting distribution recids that were reversed and if it finds one for this source document line then it generates the project accounting distribution and links it to the accounting distribution that it's processing. Then it removes that key from the map. Because it's been removed from the map, when we get around to processing the last accounting distribution which should get an associated project accounting distribution, nothing is found in this map for the source document line and so no project accounting distribution is created.
What I found is if I simply apply an order by recid descending as the accounting distribution records are processed in the processRegularDistributions method, then the latest accounting distribution is processed first and gets a project accounting distribution as expected and the original one does not. This fix seems to work but I'm wondering if anyone who is more familiar with the process of updating project accounting distributions would be able to weigh in on anything I may be missing. Does this seem like a bug in Microsoft's project accounting distribution processor? I'm anxious to change this low level code. I look over at LCS finds 100s of issues around project accounting distributions but nothing is coming up on this particular method (\Classes\AccDistProcessorProjectExtension\#processRegularDistributions).
Is anyone familiar with this process? Any suggestion on getting it fixed?
How did you do No 2?
I would expect that this is not possible unless somebody has modified something.
Thank you, I hadn't realized that we have a customization to allow the project id to be edited on purchase order lines. Looks like we've opened a can of worms with that customization.
Business Applications communities