Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Dataverse table key failed in managed solution

(0) ShareShare
ReportReport
Posted on by 195

I have a managed solution which is in our production environment. We have Dataflows which pulls data into a table from MSSQL and somehow created duplicates in one of the key fields and now that key is showing failed. Also the Dataflow is failing to refresh/run aswell.

 

See screenshot of the failed key below:

 

bfausti_0-1665023193045.png

 

Also see the error message comig from the Dataflow:

 

gbca_project table's key gbca_uniqueprojectnumber could not be created. Please delete the existing key and create new key for the table and try again. Additional information: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.gbca_projectBase' and the index name 'ndx_for_entitykey_gbca_UniqueProjectNumber'. The duplicate key value is <redacted>.

 

I have since cleared the duplicate records in the managed solution but the error still shows in both the Key and the Dataflow. As it is a managed solution I cannot delete the key and recreate it.

 

Interestingly, in the Dev environment where the unmanaged solution sits, the keys are fine and the Dataflow runs successfully.

 

Any ideas how to fix this issue so that the keys will show active in the managed solution, I don't think re-importing the solution in the prod environment will help in this situation as nothing has changed structurally right?

Categories:
  • Verified answer
    bfausti Profile Picture
    195 on at
    Re: Dataverse table key failed in managed solution

    I was able to resolve the issue via XRMToolbox using an alternate key manager. I was able to re-active the key from there:

    bfausti_0-1665030558473.png

     

  • bfausti Profile Picture
    195 on at
    Re: Dataverse table key failed in managed solution

    Thank you for your response. 

    However, when I try to run Solution 2 I get the following error:

    bfausti_0-1665026192837.png

     

    I have no idea what object dbo.gbca_projectBase is, this is not any table or field that exists in the solution. Do you know if this could be referring to another type of object?

  • a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: Dataverse table key failed in managed solution

    Hello,

    Check this post - https://www.inogic.com/blog/2018/06/handle-alternate-key-exception-event-failed-due-to-an-exception-in-dynamics-365/

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics