D365 SDK-获取特定解决方案的实体列表

时间:2019-07-11 10:10:17

标签: c# sdk dynamics-crm microsoft-dynamics

我想使用D365获取SDK中的实体列表,为此,我目前使用了REF代码:

public static EntityMetadata[] GetEntities ( IOrganizationService organizationService)
{
    Dictionary<string, string> attributesData = new Dictionary<string, string>();
    RetrieveAllEntitiesRequest metaDataRequest = new RetrieveAllEntitiesRequest();
    RetrieveAllEntitiesResponse metaDataResponse = new RetrieveAllEntitiesResponse();
    metaDataRequest.EntityFilters = EntityFilters.Entity;

    // Execute the request.

    metaDataResponse = (RetrieveAllEntitiesResponse)organizationService.Execute(metaDataRequest);

    var entities = metaDataResponse.EntityMetadata;

    return entities;
}

但是除此之外,我想根据解决方案选择来过滤这些实体,例如下方:

Solution => SampleSolution 
Entities => All entities of SampleSolution

有没有可用的过滤器来实现这些目标?

0 个答案:

没有答案