Hello Experts,
we are currently investigating the possibilities of the Microsoft POS offline functionality.
We setup a MPOS device with offline functionality and successfully installed it on a Windows device.
Then we did a full sync in Retail HQ to the offline database and also did the sync on the MPOS. Going offline works fine.
The problem we are now facing is when we try to complete a purchase and want to add a product to the transaction. It fails and gives a very generic error message: We cannot process your request this time. Please try again later..
The event viewer also throws some errors:
An exception of type: 'System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.PercentPerTax(Decimal limitBase, TaxCode taxCode)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetPercentPerTax(TaxCode code, Decimal taxBase, ReadOnlyCollection`1 otherCodes)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetBasePriceAdvancedTaxIncluded(Boolean collectLimits, GetBasePriceForTaxIncludedServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetBasePriceForTaxIncluded(GetBasePriceForTaxIncludedServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)' occurred while executing Microsoft.Dynamics.Commerce.Runtime.Services.TaxService request by . Error resource id: 'System.NullReferenceException', Exception: -9432-4536-aa46-937d7f258ea3.
Retail proxy client offline request failed. RequestUri: crt://offline/CartManager/AddCartLines?Id=%22000041-NY-MP02-17%22&cartLines=%5B%7B%22ItemId%22%3A%2210311.00227%22%2C%22EntryMethodTypeValue%22%3A3%2C%22Description%22%3A%22Merino%20Beanie%20U%20Mulberry%22%2C%22ProductId%22%3A5637149740%2C%22Quantity%22%3A1%2C%22UnitOfMeasureSymbol%22%3A%22ea%22%2C%22TrackingId%22%3A%22%22%2C%22CatalogId%22%3A0%7D%5D&cartVersion=474091&$locale=en-US. Exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.PercentPerTax(Decimal limitBase, TaxCode taxCode)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetPercentPerTax(TaxCode code, Decimal taxBase, ReadOnlyCollection`1 otherCodes)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetBasePriceAdvancedTaxIncluded(Boolean collectLimits, GetBasePriceForTaxIncludedServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetBasePriceForTaxIncluded(GetBasePriceForTaxIncludedServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
bei Microsoft.Dynamics.Commerce.Runtime.RequestContextExtensions.Execute[TResponse](RequestContext requestContext, Request request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetBasePriceForTaxIncluded(GetTaxBasesServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.GetTaxBases(GetTaxBasesServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
bei Microsoft.Dynamics.Commerce.Runtime.RequestContextExtensions.Execute[TResponse](RequestContext requestContext, Request request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.Calculate(Boolean calculateBasePrice, Boolean isStoreCurrency, Boolean taxIncludedInPrice, TaxableItem taxableItem, TaxCode taxCode, ReadOnlyCollection`1 taxCodes, ReadOnlyCollection`1 activeSalesLines, Decimal intervalBasis, RequestContext requestContext)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.CalculateTaxCodeTaxInclusiveAmount(CalculateTaxCodeTaxInclusiveAmountServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
bei Microsoft.Dynamics.Commerce.Runtime.RequestContextExtensions.Execute[TResponse](RequestContext requestContext, Request request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxCodeProvider.CalculateTaxAmountForItem(TaxableItem taxableItem, TaxCode taxCode, ReadOnlyCollection`1 taxCodes, SalesTransaction transaction, TaxCodeIntervalSelector taxCodeIntervalSelector, TaxCodeAmountRounder taxCodeAmountRounder)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxCodeProvider.CalculateTaxForItem(TaxableItem taxableItem, RequestContext context, SalesTransaction transaction, Dictionary`2 taxCodeInternalsLookup, TaxCodeIntervalSelector taxCodeIntervalSelector, TaxCodeAmountRounder taxCodeAmountRounder, ICollection`1 exemptTaxCodes)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxCodeProvider.CalculateTaxForItems(RequestContext context, ReadOnlyCollection`1 taxableItems, SalesTransaction transaction)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxCodeProvider.CalculateTaxOnTransaction(RequestContext context, SalesTransaction transaction)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.CalculateTaxOnTransaction(RequestContext context, SalesTransaction transaction)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.CalculateTax(CalculateTaxServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.TaxService.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
bei Microsoft.Dynamics.Commerce.Runtime.RequestContextExtensions.Execute[TResponse](RequestContext requestContext, Request request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.CartService.CalculateTaxes(RequestContext context, SalesTransaction transaction)
bei Microsoft.Dynamics.Commerce.Runtime.Services.CartService.CalculateSalesTransaction(CalculateSalesTransactionServiceRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.Services.CartService.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
bei Microsoft.Dynamics.Commerce.Runtime.RequestContextExtensions.Execute[TResponse](RequestContext requestContext, Request request)
bei Microsoft.Dynamics.Commerce.Runtime.Workflow.SaveCartRequestHandler.Process(SaveCartRequest request)
bei Microsoft.Dynamics.Commerce.Runtime.SingleRequestHandler`2.Execute(Request request)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
bei Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
bei Microsoft.Dynamics.Commerce.Runtime.Client.CommerceRuntimeExtensions.Execute[TResponse](ICommerceRuntime runtime, Request request)
bei Microsoft.Dynamics.Commerce.Runtime.Client.OrderManager.PerformSaveCart(Cart cart, Nullable`1 modes, Boolean isGiftCardOperation)
bei Microsoft.Dynamics.Commerce.Runtime.Client.OrderManager.PerformSaveCart(Cart cart, Nullable`1 modes)
bei Microsoft.Dynamics.Commerce.Runtime.Client.OrderManager.AddCartLines(String cartId, IEnumerable`1 cartLines, Nullable`1 calculationModes, Nullable`1 cartVersion)
bei Microsoft.Dynamics.Commerce.RetailProxy.Adapters.CartManager.<>c__DisplayClass12_0.<AddCartLines>b__0()
bei System.Threading.Tasks.Task`1.InnerInvoke()
bei System.Threading.Tasks.Task.Execute()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.Dynamics.Commerce.RetailProxy.Adapters.AdaptorCaller.<ExecuteMethod>d__30.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.Dynamics.Commerce.RetailProxy.Adapters.AdaptorCaller.<CallCommerceRuntimeAsync>d__28.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.Dynamics.Commerce.RetailProxy.Adapters.AdaptorCaller.<ExecuteAsync>d__25.MoveNext().
The Commerce Runtime Request with request id 'b45fbf87-1192-45b8-4fd2-82bbf6994880' and request url 'crt://offline/CartManager/AddCartLines' failed. Error: {
"TypeName": "CommerceException",
"Exception": "{\r\n \"ErrorResourceId\": \"Microsoft_Dynamics_Internal_Server_Error\",\r\n \"LocalizedMessage\": \"An error occurred on server while processing this request.\"\r\n}",
"CorrelationId": "00000000-0000-0000-0000-000000000000"
}.
Chained request execution failed.
Can anyone please advice if there is any additional setup needed?
Thank you very much!
Hi
It looks this issue is caused by customization code. Your customization code will call Real time service to calculate the tax. But by my understand, RTS is not support in offline mode. I suggest you double check this with your DEV team, try to re test it after remove the customization code. Or try to use the standard code to calculate the tax in offline mode. Hope this can help you.
This is the code call stack:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156