Saturday, June 21, 2014

Mysterious issue of missing R3 Retail "Active price" in Retail Product Pricing

Dynamics AX 2012 R3 Retail HQ you will be able to see the Store specific pricing for each of the products. The form can be accessed either from Stores or Products from the Retail ribbon bar. The Retail price list form consolidates the details from various sources like assortment, product pricing and Trade agreements. So it can be "laggy" when you open the form if you have lots of products or stores.



There are various columns for price and discounts, my focus at this time is on the column "Active price". It is supposed to show the final product price after computing from the trade agreements if any or just the base sales price. But in my application it was showing as Zero, even if I had an appropriate trade agreement applicable for the Product. 

Deeper investigation reveals that the actual pricing is computed by the PricingEngine dll from Reference assembly Microsoft.Dynamics.Commerce.Runtime and which is inturn handled by the DLL Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.dll from the RetailPricingEngine class. It always broke without error during the invocation of the dll function. Was wondering why it was breaking exactly at this point. While I checked and compared with another environment that was working as expected for price computation. Compared the DLL size/modified date/contents and it seemed everything was same except the calculation was not showing correctly.

Finally after an exhaustive search(coincidentally Retail POS was also not showing correct product prices which prompted for a detailed function call by call trace) found the issue on the HQ was due to simple setting at the AOS. Due to the back and forth hot swapping of assemblies between the client and server, bringing my Debugger in between crashed the DLL function call of pricing engine. I was hoping for a decent error or warning to indicate something wrong with the dll but it just ended quietly without triggering any messages. So I disabled my hot swapping of assemblies at the AOS and restarted the AOS service. Active prices came back and the Pricing Engine DLL did its job as expected to return the exact prices which would be seen in the Retail POS.



An interesting point to note is both the HQ and the POS use the same Pricing Engine DLL to get the product price for the store with all other parameters included for consideration. So if you see the Product price in the HQ pricing form, it is guaranteed to be same on the POS price window(conditional discounts, promotions, etc not applicable) for a unit of that product.


8 comments:

  1. Hi
    I have disable the hot-swapping and active price column came in HQ but still if i scan the item in pos am facing issue "Item price cannot be calculated,manually enter the item price".

    ReplyDelete
  2. Hello Ashok, can you please check the steps for Retail if you have missed any steps or something to do with Product setup? One of my other post touches on the pricing part at POS, you may to double check it to ensure everything is okay. http://ondynamicsax.blogspot.sg/2014/08/retail-pos-does-not-show-price-no.html

    ReplyDelete
    Replies
    1. Thanks for your immediate response Praveen, After running the query its come to know I had some synchronization problem in my tables.I have updated now,price is triggering now.

      Thanks a lot for your suggestion.

      Delete
  3. Dear All,

    i am also facing the same problem could you please tell the solution.


    Thanks
    Anand

    ReplyDelete
    Replies
    1. Hello Anand, just follow the blog steps and your issue should be solved.

      Delete
  4. Hi Ashok and Praveen,
    i have the same error and cant resolve this, any help !
    Item price cannot be calculated,manually enter the item price

    ReplyDelete
    Replies
    1. Hello Ashraf, the price described here at the blog post is at the HQ. I believe what you are mentioning is at the Retail POS. There can be many reasons why the price is not getting computed by the retail POS like Store setup's and configuration or could simply the GAC issue for the DLL's. You can probably check the AX support how to register the DLL using powershell from the detailed post here. https://blogs.msdn.microsoft.com/axsupport/2015/08/13/dynamics-ax-r3-cu9-demo-image-a-different-the-price-cannot-be-calculated-for-the-item-error-in-epos/

      Delete