I am trying to generate ERD for all entities in our Dynamics 365 instance using Microsoft Dynamics SDK Code through Visual Studios, but getting the following error:
System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Found an attribute with unrecognised required level. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).
Part of the code where failing:
// Load the metadata.
Console.WriteLine("Loading Metadata...");
RetrieveAllEntitiesRequest request = new RetrieveAllEntitiesRequest()
{
EntityFilters = EntityFilters.Entity | EntityFilters.Attributes | EntityFilters.Relationships,
RetrieveAsIfPublished = true,
};
RetrieveAllEntitiesResponse response = null;
try
{
Error Point> response = (RetrieveAllEntitiesResponse)_serviceProxy.Execute(request);
builder._metadataResponse = response;
}
catch (Exception ex)
{
}
Please not that using RetrieveEntityResponse
(for single entity) works, but does not show related entities in MS Visio diagram.
I have also used MetadataDiagramConsole.exe
to run this for all entities, but it throws an error and SDK
version is latest.
Thanks.