I have already shared the posts on Odata calls – post1, post 2 and post 3
OData often brings its own set of challenges, but every issue becomes a learning opportunity.
I had a requirement to include the InventDimId in the API request, and I encountered an error specifically when sending the identical InventDimId value that the system expected.
For instance, I passed the InventDimId in the below GET Request
https://FOURL.dynamics.com/data/InventDimBiEntities?$filter= inventDimId eq '#00000001501EF9D3'
The special characted # was throwing the error

To fix this, use the below code
https://FOURL.dynamics.com/data/InventDimBiEntities?$filter= inventDimId eq '%2300000001501EF9D3'
The code # is replaced with %23 which fixed the issue and I got the result.

Original Post https://anithasantosh.wordpress.com/2026/03/02/handling-special-character-in-odata-call-d365fo/






