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

Announcements

News and Announcements icon
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,165 Super User 2026 Season 1 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
  • CU27040852-14 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 149 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 107 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 102 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans