Skip to main content


Showing posts from October, 2018

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 newCart, SalesTransaction salesTransaction, Dictionary`2 salesLineByLineId, Car

Send file to temp blob storage in #MSDyn365FO

In this post I will talk about sending a file to a temporary blob storage. A little warning before I get into it. This is using the Microsoft’s blob storage that is provisioned for us. I haven’t given it a lot of thought on how it would behave in production. Take it at your own risk. Lets start by looking back on a couple of posts last month on printing a report to a byte array. You can use those sample pieces of code to get a report as a stream and send it to the below code. if (stream) { str fileName = 'myfile'; str contentType = 'application/pdf'; str fileExtension = SRSPrintDestinationSettings::findFileNameType(SRSReportFileFormat::PDF, SRSImageFileFormat::BMP); FileUploadTemporaryStorageStrategy fileUploadStrategy = new FileUploadTemporaryStorageStrategy(); FileUploadTemporarySto

Find TableId using table browser #MSDyn365FO

I am usually doing this from the development environment. However, I was debugging a customer environment where I only had access to the front end. I had a table that only gave me the RefTableId. I needed to find out the table that record related to. I used SysTableIdView from table browser. Here is the link.