Skip to main content

Posts

Showing posts with the label Debug

Debug Modern POS using .NET Reflector

Respect to all those POS developers. It really requires some dedication and focus to be a POS developer. This is an example of something I would have not figured out without my colleagues. We were working on a development project and we struggled to make sense out of the error. The error we got was complaining about the a method to validate the Unit of measure and Quantity. I was sure the object was not null and I had passed the right thing to it. Unit of measure and quantity fields were populated correctly. The modification was overriding the price. System.NullReferenceException was unhandled by user code    HResult=-2147467261    Message=Object reference not set to an instance of an object.    Source=Microsoft.Dynamics.Commerce.Runtime.Workflow    StackTrace:         at Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.ValidateCartLineUnitOfMeasureAndQuantity (RequestContext context, Cart newCa...

Troubleshooting web service authentication Dynamics 365 for Operations

In this post I just wanted to highlight the event viewer logs on a developer box. Make good use of it – not just for web services but for most errors. Below is a recently problem I was troubleshooting. I was working on the Microsoft github integration project to do a proof of concept using odata. I had problems with the authentication. I was able to retrieve the token from Azure AD however the odata authentication piece failed with D365O. I got this error “Microsoft.OData.Client.DataServiceClientException: Unauthorized”  In debug I got down to this “Unknown user type” error. So, after looking at the event viewer. Expand Applications and Service Logs > Microsoft > Dynamics > AX-IntegrationCommon > Operational From the error I found that the tenant which is blurred was different. I had 2 Azure subscription. All I had to do what runt he Admin Provisioning tool against the tenant I wanted to do the integration with. Then all worked fine. Another way I could ha...

How to debug xslt transformation using visual studio [AX 2012]

Dynamics AX 2012 has introduced the ability to transform an xml message using xslt. Refer to the technet article for more information on transformation of inbound ports http://technet.microsoft.com/en-us/library/hh352243.aspx Also see this nice blog post on importing bank reconciliation files using standard BAI formats  http://blogs.msdn.com/b/axsupport/archive/2014/05/20/advanced-bank-reconciliation-setup-in-ax-2012-r2.aspx Back to the topic - In this post I will show you how to debug and run the transformation in visual studio 2010. First thing you do is open up the xslt file with Visual Studio. You will see the xml editor tools on the toolbar. If you dont see it, then just right click the toolbar and add it by selecting the “XML Editor”. Now you can place a breakpoint in the document and click the start xslt debugging button (Alt +F5). First time you run it you will get to choose the input file. If you have run it before this will be defaulted. You can change it by goi...