http://mibuso.com/blogs/davidmachanick/2015/06/22/nightmare-on-nav-street-codeunit-80-problems-and-solution/
I have posted my sample program on my blog.
I think the more we extend NAV, the worse codeunit 80, 90, and some of the other codeuntis get, and the harder it becomes to make mods.
I have not attempted to untangle the logic - just separate error checking and posting, and reduce table locks.
When I get time, I will look at untangling the logic as well.
As NAV adds more and more nice features, I think it is important to fix the codeunits that are not following the new NAV coding standards.
If you add any sizable ISV products to the posting codeunits, they become even more tangled.
Comments
That depends on the setting of "Expected Cost Posting".
I will add that in, next time I work on it.
http://mibuso.com/blogs/davidmachanick/
I still have to do some more testing and cleanup on my proposed solution.
What I have done is meant to be a demonstration on how to make codeunit 80 conform to published NAV standards, and it will take additional work to fully test it, and even more to have it pass Gary Winters readability proposal.
http://mibuso.com/blogs/davidmachanick/