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 :
Microsoft Dynamics CRM (Archived)

Import failed: EntityService.Create failed for ObjectTypeCode: -1 caught exception

(0) ShareShare
ReportReport
Posted on by 10

Hi community!

I package and export a solution (there are several customized entities,js files and plug-ins in it) from a D365 online environment. Then I applied for another D365 online trial environment and imported the Solution just exported, but the following error occurred. How should I deal with it?

Note: I tried to import separately each entity, and this problem just occurred to a custom entity. The others could be imported successfully.

0x80044150: An item with the same key has already been added.

Import failed: EntityService.Create failed for ObjectTypeCode: -1 caught exception: 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.EntityService.CreateInternal(EntityCreateInfo entityInfo, MetadataHelper metadataHelper, ExecutionContext context)    at Microsoft.Crm.Metadata.EntityService.<>c__DisplayClass18_1.<CreateInternalHelper>b__3()    at Microsoft.Crm.Metadata.SqlTelemetryHelper.LogSqlTimes(Action action, String operationName)    at Microsoft.Crm.Metadata.EntityService.CreateInternalHelper(EntityCreateInfo entityInfo, MetadataHelper metadataHelper, ExecutionContext context)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    Are you importing this entity first time ? or this already exists in the target environment, it maybe the field you are trying to import already exists with the same name but different type. Please recheck your target environment if there is any field with the same name.

  • Luis Yang Profile Picture
    10 on at

    Hi Mahen,

    Yes, this is my first time to import the solution.The target environment is new and currently has no custom entities on it.

    Luis

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi,

    The first time when you tried may be succeeded in importing but there may be issue with trial version. that is why you are getting duplicate error. Try creating a new trail from private browser and wait for some time to get the complete setup then try importing again

  • Luis Yang Profile Picture
    10 on at

    Hi Sreevalli,

    At first, I thought the same way. I applied for an environment and waited for 24 hours to import. Unfortunately, the result was the same.

    Luis

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi Luis,

    Appreciate the effort

    What kind of customizations are there in the custom entities? How many entities are there. try to create a new custom entity and import in without adding any extra customizations - just for testing if it issue with custom entity import. If yes, go for a support ticket to understand what is causing the issue with trail versions.

  • cath_a_t Profile Picture
    5 on at

    I am having what is possibly the same issue.  I have a solution which I imported into a trial a month ago.  I have just tried to import the same solution into a new trial and it is generating the same error against the second custom entity it finds.  I'm very confused when nothing has been changed in the solution.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans