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
Happy!
Hi Kurt! Nice post. I find decompilation very useful too. In my case I worked with product configurator. I decompiled PC libraries and it helped me to get whole picture.
LikeLiked by 1 person