Search code examples
restdynamics-crmmicrosoft-dynamicsdynamics-crm-365

How do we filter the entities which is not start with "msdn" using MSDynamics Web API


I want to get all entities which are the name not start the prefix as 'msdn' from ms dynamics. I tried the below APIs, got the error.

GET /api/data/v9.1/EntityDefinitions?$select=LogicalName&$filter=not startswith(LogicalName,%27msdn%27)

Response :

{  
"error":
      {"code":"0x0",
       "message":"The \"startswith\" function isn't supported for Metadata Entities."
       }
}

I referred https://learn.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-data-web-api#standard-query-functions


Solution

  • I have checked that in one of my environment as well. What you require is not possible.

    You will have to go 2 steps.

    Retrieve all entities and then filter them out in your local program may it be JavaScript/C# or Json filtering/Power automate or something.