web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Cannot Publish

(0) ShareShare
ReportReport
Posted on by

When i try to Publish anything like form, solution it shows following error

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: Failed to process metadata description - Name: EntityKey, ID: cfe5039c-d000-4bca-bc36-f7a934dab252Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>b6c01911-d0cc-4cd6-8c37-60e4128f01d9</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.WebServices.PublishXmlService</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: Failed to process metadata description - Name: EntityKey, ID: cfe5039c-d000-4bca-bc36-f7a934dab252 ---&gt; Microsoft.Crm.CrmException: Failed to process metadata description - Name: EntityKey, ID: cfe5039c-d000-4bca-bc36-f7a934dab252 ---&gt; System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.Metadata.MetadataContainer.AddEntityKey(IEntityKeyDescription entityKeyDescription)
at Microsoft.Crm.Metadata.MetadataContainer.AddDescription(IMetadataDescription description, String name, Int32 groupCount)
--- End of inner exception stack trace ---
at Microsoft.Crm.Metadata.MetadataContainer.AddDescription(IMetadataDescription description, String name, Int32 groupCount)
at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.LoadDescriptions(IMetadataContainer metadataContainer, Dictionary`2 descriptionsCollection)
at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.LoadContainerData(IMetadataContainer metadataContainer, Dictionary`2 descriptionsCollection, List`1 privilegesCollection, List`1 deletedDataCollection)
at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.&lt;&gt;c__DisplayClass19_0.&lt;LoadContainerData&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.BuildMetadataContainerFromDatabaseInternal(LoadMasks masks, ISqlDataAccess crmSqlDataAccesser, CounterList counter, Boolean isInStagedContext, BuildTableFillPropertiesTemplate buildTableFillProperties)
at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.BuildMetadataContainerFromDatabase(LoadMasks masks, ISqlDataAccess crmSqlDataAccesser, CounterList counter, Boolean isInStagedContext)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.&lt;&gt;c__DisplayClass41_0.&lt;LoadMetadataContainerFromDatabase&gt;b__0(ISqlDataAccess crmSqlDataAccesser)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadMetadataContainerFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter, BuildMetadataContainerFromDatabaseTemplate buildMetadataContainerFromDatabase, Nullable`1 optionalVersionNumberToFilterResults)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadMetadataContainerFromDatabase(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter, Nullable`1 optionalVersionNumberToFilterResults, Boolean isInStagedContext)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter, Boolean isInStagedContext)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, CounterList counter, Boolean isInStagedContext)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, CounterList counter, Boolean isPerThreadCacheLoad)
at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, LoadMasks masks, IOrganizationContext context)
at Microsoft.Crm.ObjectModel.PublishXml.InitializeHandlers(ExecutionContext context)
at Microsoft.Crm.ObjectModel.PublishXml.PublishInternal(String objectsString, Boolean flushCache, ExecutionContext context)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.ObjectModel.SolutionHistoryDataService.ExecuteWithSolutionHistory(SolutionHistoryOperation operation, IExecutionContext context, Action action, Boolean checkForSolutionContext, IBusinessEntity solutionHistoryData)
at Microsoft.Crm.ObjectModel.PublishXml.Publish(String objectsString, Boolean flushCache, ExecutionContext context)
at Microsoft.Crm.WebServices.PublishXmlService.PublishHelper(String entities, ExecutionContext context)
at Microsoft.Crm.WebServices.PublishXmlService.Publish(String entities, ExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass6_0.&lt;RunStep&gt;b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">5dcbbb1b-ea3e-db11-86a7-000a3a5473e8</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiDepthKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">1</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiActivityIdKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">b6c01911-d0cc-4cd6-8c37-60e4128f01d9</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionCategory</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">SystemFailure</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionMesageName</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">UnExpected</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionHttpStatusCode</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">400</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<HelpLink>go.microsoft.com/.../
<Message>Failed to process metadata description - Name: EntityKey, ID: cfe5039c-d000-4bca-bc36-f7a934dab252</Message>
<Timestamp>2020-11-20T15:35:23.9535845Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

What is Wrong with it???

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    HI,

    Can you try publishing customization from C# web service using below code to see if it works.

    xrmdynamicscrm.wordpress.com/.../

    Once it works then try again from UI. If it does not work you can log support ticket with microsoft.

    Please mark my answer verified if i were helpful

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 171 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 83

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans