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

Happy!

 

 

 

 

One thought on “Decompiling D365 retail components

  1. 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.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.