Skip to main content

Error Cannot Insert duplicate key in object 'dbo.DiaryLinks'

This article explains what to if, when you try and assign a candidate against a job, you get the error below:

Written by Terence Cassidy

The error is:
Could not save the information
Details : Violation of UNIQUE KEY constraint 'uk_DiaryLinks'. Cannot insert duplicate key in object 'dbo.DiaryLinks'. The duplicate key value is (nnnnn, nnn, <NULL>, <NULL>).
The statement has been terminated.

That job appears to have a consultant as both the Primary Consultant and as the Secondary Consultant.

A link for diary events is created for each consultant on a placement but the same user cannot be linked to a diary event twice, which is why it is failing.

Please remove the entry for the Secondary consultant to resolve this.

Did this answer your question?