Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Commerce forum / Retail request server ...
Commerce forum
Answered

Retail request server error

Posted on by 635

I am getting this error. Has anyone faced this? Or can point out where I am going wrong?

An error occurred during the Retail Server Request. RequestUri: XXXXXX-devret.cloud.retail.dynamics.com/.../GetTaxCodeByItem. RequestId: abd43faa-5ae8-cee7-3a07-2dd424904548. Exception: Microsoft.Dynamics.Retail.RetailServerLibrary.BadRequestException: The request URI is not valid. Since the segment 'Carts' refers to a collection, this must be the last segment in the request URI or it must be followed by an function or action that can be bound to it otherwise all intermediate segments must refer to a single resource.

pastedimage1605594520428v1.png

My retail server code looks like this:

Controller:

pastedimage1605594593606v2.png

EDMModelExtender

pastedimage1605594651096v3.png

CustomizedEDMModelFactory

pastedimage1605594714861v4.png

  • Verified answer
    Shahil Profile Picture
    Shahil 635 on at
    RE: Retail request server error

    There was an issue with the Data Service Request in POS which was returning a collection of Cart rather than a string. I regenerated the Data Service Request class using the commerceproxygenerator to get the issue resolved.

  • Xusheng Profile Picture
    Xusheng on at
    RE: Retail request server error

    Hi,

    What is your D365 version?

    In some scenarios, requests to RetailServer, like ScanResults, that contain a '/' character as part of the parameter query string may fail with an error.

    Retail Server has been corrected to correctly parse requests containing '/' on the request parameters.

    Fix can be found in latest 10.0.10 build under KB 4565356

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans