microsoft / PowerPlatform-DataverseServiceClient

Code Replica for Microsoft.PowerPlatform.Dataverse.Client and supporting nuget packages.
MIT License
284 stars 52 forks source link

Unable to get IsCustomEntity property using RetrieveAllEntitiesRequest. #480

Open dlwangac opened 1 week ago

dlwangac commented 1 week ago

I'm using RetrieveAllEntitiesRequest to get and print all entities. and I want to use [OrderByDescending(x => x.IsCustomEntity)] to print custom entities first. but [IsCustomEntity] property in RetrieveAllEntitiesResponse is null.

            RetrieveAllEntitiesRequest request = new()
            {
                EntityFilters = EntityFilters.Entity, // tables only
                RetrieveAsIfPublished = false
            };

            var response = (RetrieveAllEntitiesResponse)ServiceClient.Execute(request);

            var tables = response.EntityMetadata
                .OrderByDescending(x => x.IsCustomEntity)     // not working
                .ThenBy(x => x.LogicalName)
                .ToList();