CreateOrUpdate error

CreateOrUpdate error

I have an action that is supposed to Create/Update, but it doesn't.  When I try and update a record I get:

Cannot insert duplicate key row in object 'dbo.ProjectProduct' with unique index 'IX_ProjectProduct'. The statement has been terminated.

Is this a bug?  Or, is there something I need to do before the CreateOrUpdate step?

Hello Brett,

Can you show me the assigns and the parameters on the CreateOrUpdate action, ConvertReviewStatusCodes and the For Each?!
You might have one of them wrong, because on theory it's right.

Kind Regards,
By any chance, is ProjectProduct an Entity imported via Integration Studio? I have seen this issue there from time to time. Also, check the advanced properties of ProjectProduct if it is a native entity,and look for an additional index or unique constraint that you may have added by accident.

From the naming looks like an imported entity.

Just from what you said I would guess that either the Id is not autonumber or you have duplicate pairs of Project/Products if that is a relationship table.

It is a SQL Server db I am accessing.  

James was spot on!  Somehow I there were two indexes on the same attributes.  Delete one and all is good!!!

Brett -

Fantastic! Glad that worked out. I've made this kind of mistake mysel76=f a few times obviously... :D