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




8 comments:

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

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

    ReplyDelete

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

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

    ReplyDelete
  5. 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
  6. Thanks for sharing such unique restaurant epos systems uk information which are in actual fact as well as helpful for us.Keep it up.....

    ReplyDelete
  7. Interesting blog. compare epos system prices uk It would be great if you can provide more details about it. Thanks you.

    ReplyDelete