Thursday, March 28, 2013

AX 2012 for Retail: Trace POS calls

One major troubleshooting technique to issues found in the POS where calls are made to the AX AOS is to grab the XML that caused the error and run it in AX to see what the issue is.

On a current project, we were going into the store DB, searching for the RetailLog and finding the call and XML that caused the issue. This is ok to do when working primarily with one store DB. There is some complexity when it comes to working with multiple store DBs though. The user would have to go from store DB to store DB to find the XMLs. That can be a lot of work. Note: For those not familiar, each store needs its own DB and can have multiple terminals. The implementation of each terminal with its own store DB is no longer supported in 2012.
 
One day, a colleague stumbled upon a second alternative. We all looked into it to figure out WTF was going on. There is a way to turn on tracking for calls coming into AX so you can track multiple calls from all the POS's instead of needing to go to all the individual databases. There is something that needs to be setup in a setup file and install some software but I'll discuss those points.

To note, this log file can get very large. I'd recommend not doing this in PROD unless you absolutely have to. It's a good tool in DEV and TEST environments though.
  1. Set the RetailTransactionService XML config file to allow tracing. I've highlighted the change that needs to be set below.
  2. Install (or confirm its installed) the Microsoft SDK
  3. [Run a bunch of RTS transations]
  4. Locate the RTS log .svclog (the RTS service user's AppData\Roaming folder)
  5. Open it with the Microsoft Service Trace Viewer from the Microsoft SDK
  6. Enter filter criteria to see the transactions

Step 1 - Set the RetailTransactionService XML config file to allow tracing. I've highlighted the change that needs to be set below.
Set the switchValue node value to 'All' in the 'RetailTransactionService.exe.config' file in the C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Transaction Service folder.

Figure 1- the config file
Figure 2 - the config file contents

Step 2 - Install (or confirm its installed) the Microsoft SDK.
The image below shows the 'SvcTraceViewer.exe' file in the C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin folder location.


Figure 3 - The contents of the Microsoft SDK 
Step 4 - Locate the RTS log .svclog (the RTS service user's AppData\Roaming folder)

Figure 4 - The WCF Trace File
Step 5 - Open the .svclog file with the Microsoft Service Trace Viewer from the Microsoft SDK
Figure 5 - The Microsoft Service Trace Viewer (MSTV) program with date begin filter selected
Step 6 - Enter filter criteria to see the transactions and click 'Filter Now'
The data in the svclog file can be filtered by a number of criteria. A few are detailed below. Then clicking the 'Filter Now' button will filter out the data in the log file and present it in the Microsoft Service Trace Viewer.

Figure 6 - 'Search in' filter options 

Figure 7 - 'Level' filter options

Figure 8 - MSTV showing RTS log




15 comments:

  1. This is Awesome Post Keep it up. epos Thanks for Sharing.....

    ReplyDelete
  2. A good and informative blog. best retail pos Thanks for sharing valuable information and would like to see more from you, keeping posting more blogs...

    ReplyDelete
  3. Great post! I appreciste your work, retail epos systems Excellent stuff, will looking forward for some more postings..

    ReplyDelete
  4. excellent postbest pos system for retail keep sharing and updating thank you for posting

    ReplyDelete
  5. fantastic blog, epos systems Thanks for sharing some valuable information....

    ReplyDelete

  6. Thanks for sharing your postepos software for retail and it was very useful information

    ReplyDelete
  7. I am very thankful to all your teamepos systems for small retailers sharing such inspirational information

    ReplyDelete
  8. This is nice post emperium epos software for retail for better understanding and thanks a lot for sharing keep it up...

    ReplyDelete
  9. Thanks for sharing such a nice article. epos uk Keep sharing more useful and conspicuous stuff like this. Thank you so much.

    ReplyDelete
  10. Good information to know and right to the point. epos softwares Thanks for this well written post, i'll follow up for more updates if you keep posting them.

    ReplyDelete
  11. Great blog created by you. pos software UK I read your blog, its best and useful information. You have done a good work.

    ReplyDelete
  12. Thanks for great information you write it very clean. epos system I am very lucky to get this tips from you.

    ReplyDelete
  13. I believe this would be very helpful. Many thanks for sharing with us. Keep it up.

    Retail POS Software

    ReplyDelete
  14. Thanks for sharing such unique information tablet pos system uk which are in actual fact as well as helpful for us.Keep it up.....

    ReplyDelete
  15. Interesting blog. epos software It would be great if you can provide more details about it. Thanks you.

    ReplyDelete