Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

codeunit flow of posting of purchase and sales

Posted on by 155

Hi, 

 I want to get the overview of codeunit execution step by step while posting. can any body suggest how to get this, I mean that any pdf or accessing through any customer or patner souce or suggest any way how to learn this

*This post is locked for comments

  • Suggested answer
    Nick Haman Profile Picture
    Nick Haman on at
    Re: codeunit flow of posting of purchase and sales

    Hello,

    There is no documentation of the entire process step by step, so you will need to use a combination of things to maybe get the entire step by step of the process. You can use the built in Code Coverage and Client Monitor tools as long as you do this from a Classic Client (These tools do not work with RTC). You can get to the point where you want to start executing the process and document it. At that point go to Tools>Client Monitor and click Start. Now also go to Tools>Debugger>Code Coverage and also click Start. Run the process, and then when done go to Code Coverage and click Stop and also go to the Client Monitor and click Stop. The client Monitor may be a little to much information so maybe do a small process first to see if you need this type of information. The Code Coverage however will show every object that was touched, and if you select a line, and click the Code button, it will open up the code and show what code was executed as it is color coded when you open that Code form. The only other way outside of the above, would be to just Step through the code by going to Tools>Debugger>Active and to make it easy also go to Tools>Debugger and mark the Breakpoint on Triggers option so it hits a breakpoint as soon as you start the process. Then start the process and you will actually be able to step through the code. This could take a while to step through as a lot of code executes during posting. It also depends on if you are using serial numbers/lot numbers/different costing types, and all kinds of setups factors as to what code will or will not 'fire' as it will follow a different set of code depending on what options you are using, but much of it will be used no matter what. This is the best way of looking at what code is used.

    Nick

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans