Hello All,
I want to retrieve list of all entities having relationship with Activities.
I have gone through the below code,
RetrieveAllEntitiesRequest req = new RetrieveAllEntitiesRequest();
req.EntityFilters = EntityFilters.Entity;
req.RetrieveAsIfPublished = true;
RetrieveAllEntitiesResponse response = (RetrieveAllEntitiesResponse) service.Execute(req);
List<string> list = new List<string>();
foreach (var item in response.EntityMetadata)
{
list.Add(item.LogicalName.ToUpper() + " " + item.DisplayName.ToString().ToUpper());
}
list.Sort();
But above code shows all the entities present in MS CRM 2015.
I have a requirement where I have to show "List of entities " in dropdown who has relationship with Activities. I have tried using "IsActivityParty" property of an entity but it won't include my Custom Entities.
Your help is appreciated.