web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Odata PATCH fails with double-encoded forward-slash

(1) ShareShare
ReportReport
Posted on by 20
01T12:00:00Z,RouteId='ROUT0003938',ProductSizeId='HB65',ProductColorId='SP100',ProductionSiteId='85',ProductConfigurationId='219875',ProductStyleId='3',ItemNumber='HIDN-TED200%252F2-SLV')?cross-company=true
 
Note: ExpRouteVersions is a custom entity built by the company I work for - it's in our custom F&O model.
 
Please note that you don't need to do an actual PATCH to repro this. You can simply copy/paste that URL into the address bar of a browser and see the same error.
 
Now contrast the URL above with the following URL, which is structurally identical to the one above, but this one is successful: https://HIDDEN.sandbox.operations.dynamics.com/data/ExpRouteVersions(dataAreaId='ita',ValidFromQuantity=1,ValidFromDate=1900-01-01T12:00:00Z,RouteId='ROUT0000805',ProductSizeId='HB',ProductColorId='SP100',ProductionSiteId='85',ProductConfigurationId='217566',ProductStyleId='3',ItemNumber='HIDN-TED300_3')?cross-company=true
 
I believe the problem is data related. Please notice the ItemNumber value for each. For the non-working URL, the value contains a double-encoded forward-slash (/): HIDN-TED200%252F2-SLV If you double-decode /HIDN-TED200%252F2-SLV/ you will get the following: /HIDN-TED200/2-SLV/ (notice the forward-slash). That unescaped slash character is illegal and must be double-encoded to work. But in this case it is throwing this error:
 

Bad Request - Invalid URL


HTTP Error 400. The request URL is invalid.

This customer likes to put slashes in their F&O items, which has caused difficulty for our VAR solution. But in the past we have always been able to solve the problem by double-encoding the slash. In this case, however, F&O chokes on it.
 
Any ideas?
I have the same question (0)
  • Suggested answer
    Layan Jwei Profile Picture
    8,107 Super User 2025 Season 2 on at
    Hi Community member,
     
    In general, It seems / is equivalent to %252F
    And you already tried that, so maybe try %2f

    Check out this old thread if it helps 

    Just to confirm, this is ur exact item number in d365fo right? HIDN-TED200/2-SLV
     
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the futur
  • Community member Profile Picture
    20 on at
    Layan, single-encoding doesn't work. Even in the post/link you posted it is stated that special characters must be double-encoded.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 256 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 205 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 128 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans