Friday, August 15, 2014

Retail POS does not show Price - No Channel Configuration was found

Issue: 
Dynamics AX Retail POS does not show Price for products added to sale. Also you will find an event log error as 'No Channel Configuration was found' with some stack trace.

Resolution:
The Retail POS is not able to find the Channel i.e Store information based on the data setup for the legal entity, a simple overlook on a few Legal entity setups can cause this issue and become an headache during the implementation. 
Dynamics AX Retail POS uses the Channel DB's CHANNELCONFIGURATIONVIEW to get the Channel.

If you can observe the joins in the View, it seems a simple assortment, price group and store setup is not sufficient to get the prices onto the Retail POS, you would need to setup the Legal entity properly.

To make it short, make sure you have entered the language, address in Legal entity and Retail Parameters defined. After iterating changes in the setup, run the view again to check if the Store channel is retrieved correctly in the query window. Then run the POS, with the View returning the relevant record the Retail POS should be able to compute the Product prices correctly using the Retail Pricing DLL's. You should now be able to make the product sale.

Actual View(For troubleshooting):
ALTER VIEW [crt].[CHANNELCONFIGURATIONVIEW] AS
(
SELECT
[rct].[RECID],
[rct].[CHANNELTYPE],
[rct].[INVENTLOCATION],
[rct].[INVENTLOCATIONDATAAREAID],
[rct].[CURRENCY],
[rct].[PRICEINCLUDESSALESTAX],
[l].ACCOUNTINGCURRENCY AS 'COMPANYCURRENCY',
[lpa].[COUNTRYREGIONID],
[lacr].[ISOCODE] AS 'COUNTRYREGIONISOCODE',
[rsp].[EXCHANGERATETYPE],
[rsp].[STAFFPASSWORDHASH],
[rsp].[TSPASSWORDENCRYPTION],
[rsp].[DEVICETOKENALGORITHM],
[rsp].[EARNLOYALTYOFFLINE],
[rtsp].[PROFILEID] AS 'TSPROFILEID',
[rtsp].[LANGUAGE] AS 'TSLANGUAGEID',
[rtsp].[TSSTAFF] AS 'TSSTAFFLOGONCONFIGURATION',
[rtsp].[CENTRALTABLESERVER] AS 'TSHOST',
[rtsp].[CENTRALTABLESERVERPORT] AS 'TSPORT',
[rtsp].[RETAILTSDATA] AS 'TSENCRYPTEDPASSWORD',
[rtsp].[SERVERCERTIFICATEDNS] AS 'TSSERVERCERTIFICATEDNS',
[rtsp].[SERVERSERVICENAME] AS 'TSSERVICENAME',
[rtsp].[PROTOCOL] AS 'TSPROTOCOL',
[rtsp].[SECURITYOFF] AS 'TSSECURITYOFF',
[rp].PICKUPDELIVERYMODECODE,
[rp].ELECTRONICDELIVERYMODECODE,
[rp].GIFTCARDITEM,
[rp].CANCELLATIONCHARGE,
[rp].CANCELLATIONCHARGECODE,
[rp].EXPIRATIONDATE AS 'QUOTEEXPIRATIONDAYS',
[rp].MINIMUMDEPOSITFORSALESORDER,
[rp].SHIPPINGCHARGECODE,
[rct].CHANNELTIMEZONEINFOID AS 'TIMEZONEINFOID',
[clv].LANGUAGEID AS 'DEFAULTLANGUAGEID',
[rsbp].[APIKEY] AS 'BINGAPIKEY',
[lpa].VALIDFROM,
[lpa].VALIDTO,
[crt].GETCATALOGIMAGEATTRIBUTEDEFAULTVALUE() AS CATALOGDEFAULTIMAGETEMPLATE,
[crt].GETEMPLOYEEIMAGEATTRIBUTEDEFAULTVALUE() AS EMPLOYEEDEFAULTIMAGETEMPLATE,
[crt].GETCUSTOMERIMAGEATTRIBUTEDEFAULTVALUE() AS CUSTOMERDEFAULTIMAGETEMPLATE
FROM [ax].RETAILCHANNELTABLE rct

-- Get transaction service profile information
INNER JOIN [ax].RETAILTRANSACTIONSERVICEPROFILE rtsp ON rct.TRANSACTIONSERVICEPROFILE = rtsp.PROFILEID

-- Get the store's country/region
INNER JOIN [ax].COMPANYINFO ci ON ci.DATAAREA = rct.INVENTLOCATIONDATAAREAID
INNER JOIN [ax].LEDGER l ON l.PRIMARYFORLEGALENTITY = ci.RECID
INNER JOIN [ax].DIRPARTYLOCATION drl ON drl.ISPRIMARY = 1 AND drl.PARTY = ci.RECID
INNER JOIN [ax].LOGISTICSPOSTALADDRESS lpa ON lpa.ISPRIVATE = 0 AND lpa.LOCATION = drl.LOCATION
INNER JOIN [ax].LOGISTICSADDRESSCOUNTRYREGION lacr ON lacr.COUNTRYREGIONID = lpa.COUNTRYREGIONID

-- Get the store's default language
INNER JOIN [crt].CHANNELLANGUAGESVIEW clv ON clv.CHANNEL = rct.RECID AND clv.ISDEFAULT = 1
INNER JOIN [ax].RETAILPARAMETERS rp ON rp.[KEY] = 0 AND rp.DATAAREAID = rct.INVENTLOCATIONDATAAREAID

CROSS JOIN [ax].RETAILSHAREDPARAMETERS rsp

LEFT JOIN [ax].RETAILSHAREDBINGPARAMETERS rsbp ON rsbp.[KEY] = 0
WHERE rsp.[KEY] = 0
)

Detailed Event Log:
LSRetailPosis.POSProcesses.ProcessInput: Microsoft.Dynamics.Commerce.Runtime.ConfigurationException: No channel configuration was found.
   at Microsoft.Dynamics.Commerce.Runtime.Data.ChannelDatabaseAccessor.GetChannelConfiguration(Int64 channelId)
   at Microsoft.Dynamics.Commerce.Runtime.Data.ChannelDataManager.GetChannelConfiguration(Int64 channelId)
   at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.CreateRequestContext(Request request)
   at Microsoft.Dynamics.Retail.Pos.PriceService.Price.GetPrice(IRetailTransaction retailTransaction)
   at LSRetailPosis.BusinessLogic.ItemSystem.CalculatePriceDiscount(IPosTransaction transaction)
   at LSRetailPosis.BusinessLogic.ItemSystem.CalculatePriceTaxDiscount(IPosTransaction transaction)
   at LSRetailPosis.POSProcesses.ItemSale.Execute()
   at LSRetailPosis.POSProcesses.Operation.RunOperation()
   at LSRetailPosis.POSProcesses.ProcessInput.Execute().

3 comments:

  1. Nice article Praveen. Solved the same problem for us....We were missing the real time service profile configuration on the channel form

    ReplyDelete
  2. Thanks for your information, we will try that.

    Marcus

    ReplyDelete