Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Existing unique index changed may cause unique index violation

(0) ShareShare
ReportReport
Posted on by 490

Hello Team,

We are facing the Error for Unique  Index Changed in CustInvoiceTable, CustInvoiceTrans and CustPackingSlipTrans. Please see below snap for your perusal.

Please help us to resolve the issue ASAP. Thank You.

pastedimage1616678212758v1.png

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Existing unique index changed may cause unique index violation

    It's still a warning, not an error. Assuming you talk about the original issue from your initial question.

    Anyway, you need to identify what changes you have made in the system since the last time when you didn't have this issue. It should be easy since you do db sync whenever you deploy new changes to test/prod.

    We don't know how you manage your deployments, but either you know, or someone in your organization knows the process. Talk with them. You need to solve it with people who know what has been changed.

    Finally, once it's solved, review and adjust your deployment process to prevent it from happening again. This kind of issue should always be noticed in test system, or very latest during deployment to prod.

  • Senthil Yadav Profile Picture
    490 on at
    RE: Existing unique index changed may cause unique index violation

    Hello Nikolaos,

    We did the Synchronization after importing from DEV environment, but still the same error was being displayed. Please let us know the resolution. Thank You.

  • Senthil Yadav Profile Picture
    490 on at
    RE: Existing unique index changed may cause unique index violation

    Hello Andre,

    It successfully went through in the Copy of LIVE server, we first tested in from DEV to COPY of LIVE Server there it was successfully populated and no error messages. This is happening in LIVE server. Can you please tell what can be done now to resolve this issue. Thank You.

  • André Arnaud de Calavon Profile Picture
    294,241 Super User 2025 Season 1 on at
    RE: Existing unique index changed may cause unique index violation

    Hi Senthil,

    Are there any changes done on the listed tables? I would recommend to review changes and test in a separate environment (copy of the current production) if the DB sync will be successful. As it mentioned a changed primary index, I would act careful and not directly do it in production. Haven't you seen the same issue when moving objects from DEV to an acceptance test environment?

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Existing unique index changed may cause unique index violation

    Most likely the runtime error (that users are seeing) happens because you haven't done database synchronization since last changing something in your data model.

    When updating your prod system with latest code, you must always run a succesful database sync (well, to be precise, it's only needed if you have some data model changes). You can't let users resume using the system until the update is finished succesfully. I recommend that you review - and if necessary - adjust your prod deployment process to avoid similar issues in the future.

  • Senthil Yadav Profile Picture
    490 on at
    RE: Existing unique index changed may cause unique index violation

    Hello Nikolaos,

    The first Warning message is displayed when i synchronize the Tables CustInvoiceTable, CustInvoiceTrans and CustPackingSlipTrans. I did not click on continue but clicked on Cancel and proceeded further. Now when the users are trying to post invoices the second snap error message is displayed on user screen that SQL Server Database has an issue related to CustInvoiceTrans Table. How can i over come this error for Unique Indexes and Index Violation. We want to post the Sales Invoice Transaction smoothly. Please suggest. Thank You.

  • nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Existing unique index changed may cause unique index violation

    Hi Senthil,

    this seems to be some new problem that you didn't mention at all in your initial message.

    I don't understand what is the relation between this problem and your original post.

    I think it would be good if you could start by sharing as much information about your situation as possible.

    Thanks!

  • Senthil Yadav Profile Picture
    490 on at
    RE: Existing unique index changed may cause unique index violation

    Hello Nikolaos,

    Thanks for the quick response. But users are not able to post the Invoices, while posting invoice Error message is displayed as shown in below snap.

    Please suggest.

    5086.MicrosoftTeams_2D00_image-_2800_1_2900_.png

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Existing unique index changed may cause unique index violation

    Hi Senthil,

    it's actually a warning, not an error. You will see errors in the "Error" tab. Not sure what changes you have made in the table. But generally you don't need to care about this warning.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,241 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,982 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans