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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to DELETE a DataEntity entry in Dynamics 365 Finance and Operations having special characters

(0) ShareShare
ReportReport
Posted on by 85

I am facing an issue while using `oData` to perform CRUD operations with entities having special characters. For example, the oData URL to `GET` a SecurityRole is `/data/SecurityRoles('<security-role-identifier')`. If the `<security-role-identifier>` has special characters then the URL doesn't work.
I encode the `<security-role-identifier>` using the `java.net.URLEncoder` with 'UTF-8' encoding.

This handles few of the special characters but not all. As a workaround, I started using the the following URL, which worked for me:

     /data/SecurityRoles?$filter=SecurityRoleIdentifier eq '<UTF-8-encoded-identifier>'

This resolved my issue for the `GET` operation. But, I am still stuck for the `DELETE` operation. The **DELETE operation doesn't support $filter query parameter** and hence the URL for DELETE is /data/SecurityRoles(<security-role-identifier>).

So my question is in general and not specific for D365FO -> how to support delete operation in oData having special characters.

I have the same question (0)
  • Neeraj D Profile Picture
    85 on at

    This Query works for GET - data/SecurityRoles?$filter=SecurityRoleIdentifier eq '%21%21%21%21%40%40%40%40%40%23%23%23%23%23%23%24%24%24%24%24%24%25%25%25%25%25%25%5E%5E%5E%5E%5E%5E%26%26%26%26%26%26%26*******%28%28%28%28%28%29%29%29%29%29----_____%3D%3D%3D%3D%3D%2B%2B%2B%2B%2B%2B%5B%5D%5B%5D'

    But the Same query fails for DELETE -

    /data/SecurityRoles(SecurityRoleIdentifier='%21%21%21%21%40%40%40%40%40%23%23%23%23%23%23%24%24%24%24%24%24%25%25%25%25%25%25%5E%5E%5E%5E%5E%5E%26%26%26%26%26%26%26*******%28%28%28%28%28%29%29%29%29%29----_____%3D%3D%3D%3D%3D%2B%2B%2B%2B%2B%2B%5B%5D%5B%5D')

    I have also tried with:

    /data/SecurityRoles('%21%21%21%21%40%40%40%40%40%23%23%23%23%23%23%24%24%24%24%24%24%25%25%25%25%25%25%5E%5E%5E%5E%5E%5E%26%26%26%26%26%26%26*******%28%28%28%28%28%29%29%29%29%29----_____%3D%3D%3D%3D%3D%2B%2B%2B%2B%2B%2B%5B%5D%5B%5D')

    But still it fails. Any reasons for this and workaround to handle such scenarios?

  • Neeraj D Profile Picture
    85 on at

    It is my observation that, the Dynamics 365 FO services are not able to recognize following special characters during the delete operation:

    Unsupported Characters: +, \, ?, /

    If these are not supported during delete, then they shouldn't also be supported during CREATE.

    For ex, + is encoded as %2B but still the I am getting 404 error when the unique identifier has '+' in it. So encoding is not helping.

    Is there any way to fix this or this is the limitation from from the Dynamics365 FO?

  • Neeraj D Profile Picture
    85 on at

    An update on special characters that are not working during the DELETE operation that are directly passed in URL even after URL encoding: +,/,\,?,&,#

  • WillWU Profile Picture
    22,363 on at

    Hi Neeraj D,

    Please try to replace these characters with the appropriate hexadecimal value.

    The solution in CRM: community.dynamics.com/.../crm-odata-rest-queries-and-special-characters

  • Neeraj D Profile Picture
    85 on at

    No, its not working for a '?'. For example, this is the role entry I have which I want to delete:

    {

               "SecurityRoleIdentifier": "<SP`~Char>?:;",

               "ContextString": "",

               "AccessToSensitiveData": false,

               "Description": "SP3",

               "SecurityRoleName": "SP3",

               "UserLicenseType": "None"

           }

    This the URL that I am forming (after URL encoding) : /data/SecurityRoles('%3CSP%60%7EChar%3E%3F%3A%3B')

    to delete the entry. As you can see, all the characters are properly encoded. I have another role, just without a '?' and it works fine (both create and delete). Why is it not letting me DELETE this entry - I am getting "No route data was found for this request"

    I agree that it is not the right thing to have such characters in the security role identifier, but my question is, if the FO is allowing to create it then why not DELETE it?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 698

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 698

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans