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 365 | Integration, Dataverse...
Suggested Answer

The duplicate key value is (0, Jan 1 1900 12:00AM, manualsla_{customEntityLogicalName})

(2) ShareShare
ReportReport
Posted on by 28

I’m attempting to import a managed solution from our DEV environment into QA and encountered the following error:

 

Solution "{solutionName}" failed to import: ImportAsHolding failed with exception: Import failed: Cannot insert duplicate key row in object 'MetadataSchema.EntityRelationship' with unique index 'ndx_for_entitykey_UniqueEntityRelationship'. The duplicate key value is (0, Jan 1 1900 12:00AM, manualsla_{customEntityLogicalName}). The statement has been terminated.

We have enabled SLA on this custom entity and this entity is

Has anyone experienced this issue before or have suggestions on how to resolve it?

 
Categories:
I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    Hi saidiev3,

    The error you're encountering during solution import:

    Cannot insert duplicate key row in object 'MetadataSchema.EntityRelationship'...

    is typically caused by a conflict in SLA configurations on a custom entity when importing a managed solution. The key part of the error — (0, Jan 1 1900 12:00AM, manualsla_{customEntityLogicalName}) — suggests that the system is trying to insert a duplicate SLA relationship.

    Here are a few steps to resolve it:

    1. Check SLA Configuration: Ensure that SLA is not already enabled on the target environment (QA) for the same custom entity.
    2. Remove Existing SLA: If SLA is enabled in QA, try disabling it temporarily before importing the solution.
    3. Clean Up Holding Solution: If a previous import failed, a holding solution might still exist. Use the Solution History or Advanced Find to locate and delete it.
    4. Export as Unmanaged First: Try exporting the solution as unmanaged from DEV, import it into QA, then convert it to managed if needed.
    5. Microsoft Support: If the issue persists, consider raising a ticket with Microsoft as this may involve deeper metadata conflicts.

    Let me know if this helps!
    If the answer was useful, please mark it as helpful so others can benefit too. 😊

    Best regards,
    Daniele Incalza

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans