Additional SQL Server features and topics not covered by specific categories
From the SQL Server side of things, I recognise error 2627 as a primary key violation, but I am not sure how much that helps you.
Overall, this question is difficult to answer without knowledge about Dynamics which is not covered here in Microsoft Q&A. Instead they have their forums over on https://community.dynamics.com/ I suggest that you try there.