Wednesday, January 16, 2013

AX 2012 for Retail - Retail Transaction Services (RTS) logging

Sometimes calls from the AX 2012 for Retail POS terminals don't work the way they are expected to when they hit AX code. If the calls need to be immediate with the most up to date information, the retail transaction service (RTS) functionality would be leveraged. AX and the POS communicate back and forth through XMLs, but you can also pass other parameters as well. Note: As a rule of thumb, put as much in the XML as possible. Things can get to be a big pain very quickly when not using it.

<!---UPDATE 2/14/2013--->
 For CDE-RTS in AX for Retail R2 see below for logging. It's changed quite a bit from just using the retail log in the store DB  http://blogs.msdn.com/b/axsupport/archive/2012/12/31/ax-for-retail-2012-r2-troubleshooting-the-real-time-service.aspx
<!---END UPDATE--->

While there can be a few first steps to debugging an issue depending on the scenario, they may ultimately lead to needing to look at:
  1. The EventViewer on the RTS server used for the call (probably an AOS server)
  2. The RetailLog in the POS store DB who sent the call
The most detail is sent in the dbo.RetailLog table. In order to capture the most detail in this table and grab the XML of interest, do the following below:
  1. Set the RTS log level for the POS is at the highest possible level: 'Trace'. This is a setting in the Functionality profile, which is assigned to the store.  Run the below SQL statement against the POS database to set this. The LogLevel field is a base enum and 'Trace' is the zero value.  UPDATE RETAILFUNCTIONALITYPROFILE SET LOGLEVEL = 0
  2. Clear the RetailLog table to capture a fresh log of the error: DELETE FROM RETAILLOG 
  3. Launch the POS application and go through the order process to the selected action of interest. Once complete, run the following: SELECT * FROM RETAILLOG
Once you have the XML, you can look at it to debug it or you can copy and paste the XML into a job to manually recreate the process and debug the RTS static method that was used in the POS call.  Building this job should generally be only a few lines since the XML is already built. USEFUL HINT: When putting the XML into a string, use single quotes '</XML string>' around the whole XML as it may contain double quotes and its the fastest way.

Here is some more information around the Retail POS logging options
http://blogs.msdn.com/b/axsupport/archive/2012/08/07/ax-2012-retail-how-to-enable-tracing-in-ax-2012-retail.aspx

No comments:

Post a Comment