Servicing Director Freddie Mac EDR (Midanet) Export Event Error: "Cannot insert duplicate key..."

Servicing Director Freddie Mac EDR (Midanet) Export Event Error: "Cannot insert duplicate key..."

Error running procedure: P_Frd_EDR_BuildDAC
Cannot insert duplicate key row in object ''dbo.LoanDEvents'' with unique index ''IDX_LoanDEvents_Unq''. The duplicate key value is (####, ##,<Date>, 0).
The statement has been terminated.

Root Cause:

This issue occurs because there can be only one loan default event for any one event type for each due date.
This scenario could develop if you have a loan where there is a payment applied in one month, reversed in the next month, and then reapplied in the (same) next month.
The following information is for your local IT or system administrator. 

Environment:

Servicing Director Freddie Mac EDR (Midanet) Export Event

Workaround:

You will first need to find the problem loan.
The following SQL query will help you to do this.

The values for the DefaultTrackingID, the Devent, and the DueDate have placeholders in the query below.  You must substitute your own values in the query, based on your actual error message details:

Use Service
select * from LoanDEvents
where DefaultTrackingID = '####'
and Devent = '##'
and DueDate = '<date> 00:00:00.000'

Once you have identified the problem loan, you can change the Date Completed date in the Edit Default Event screen, in the Collection Module, for that loan.

The Freddie Mac EDR (Midanet) Export Event should then be run again, and the error should be resolved. 

ArticleNumber:

000044227