Decompiling D365 retail components

Today I got a very nice tip from a colleague on how to better understand and see the source code for the retail components.

I was experiencing that I was not able to post a CPOS sales, and in the eventlog I got the following “Cryptical” error:

Customer with RECID 5637158076 is non-chargeable account.

at Microsoft.Dynamics.Commerce.Runtime.Services.CustomerPaymentService.ValidateCustomerForOnAccountPayment(Customer customerToPayWith, RequestContext context, Boolean isPositiveAmount)


The thing with the retail server, is that we don’t have the source code on all the components. But luckily there are a way around it:

JetBrains dotPeek (just google it, and download)

This tool let you decompile all components, and have an advanced search capability. Just all the K:\RetailServer\WebRoot\bin\Microsoft.Dynamics * files, and then search for the term ValidateCustomerForOnAccountPayment:


Solution to my problem, was that the InvoiceAccount on the customer record was blank.

So now you know how to see all sourcecode in Dynamics 365 Commerce/RetailServer components






Comment List