Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How to solve Import failed: The given key was not present in the dictionary.

Posted on by 120

I am trying to import a solution in mscrm 365 (now in the process of upgrading the system) and I get 

Import failed: The given key was not present in the dictionary.

The full error is : The import failed. For more information, see the related error messages. : System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.    at System.ThrowHelper.ThrowKeyNotFoundException()    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)    at Microsoft.Crm.Metadata.GenericReportTableView.GetSecuredFieldDecisionAttribute(MetadataBusinessEntity attribute)    at Microsoft.Crm.Metadata.GenericReportTableView.AddSelect(StringBuilder reportView, Guid[] attributesReferencingVE)    at Microsoft.Crm.Metadata.GenericReportTableView.CreateReportViewGenerationScript()    at Microsoft.Crm.Metadata.ViewGenerator.RegenerateReportViews(Guid[] entityIds, Dictionary`2 viewSet, Boolean grantAccessToReportObjects)    at Microsoft.Crm.Metadata.ViewGenerator.RegenerateViews(ViewGenerationInfoDictionary viewGenerationSet, SqlViewTypes viewTypes, Boolean grantDatabaseAccessToReportViews)    at Microsoft.Crm.Metadata.MetadataHelper.<RegenerateViews>b__131_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.MetadataHelper.ProcessDatabaseOperationsInternal(CounterList listCounters)    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.MetadataHelper.ProcessDatabaseOperations()    at Microsoft.Crm.Tools.ImportExportPublish.ImportStagingEndHandler.ImportItem()    at Microsoft.Crm.Tools.ImportExportPublish.ImportHandler.ImportInternal()    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.Tools.ImportExportPublish.RootImportHandler.ImportAndUpdateProgress(ImportHandler ih)    at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.ProcessHandlers(String[] ImportEntities, Hashtable ht, String& curPath, ImportHandler& ihForCurrentPath, CounterList listCounters)    at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.RunImport(String[] ImportEntities)

The  solution in managed.

The version is 365 v9.1 on-premise 

This error is new to me and I'm not sure what to check or what to change, can someone please guide me, I read online answers but no change.

  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: How to solve Import failed: The given key was not present in the dictionary.

    Hi damka,

    This may be due to the custom code used/written in your:

    1. workflow extension
    2. plugin
    3. etc

    Provide all values of the column that exists in the table for two records and import that file. You will face this issue.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans