Error: Data could not be saved. The DELETE statement conflicted with the REFERENCE constraint "FK_BATCHREVENUEENHANCEDMATCHINGGIFTS_RELATIONSHIPID". The conflict occurred in database [NAME] table dbo.BATCHREVENUEENHANCEDMATCHINGGIFTS column RELATIONSHIPID

When trying to merge two organizations using the Merge organizations record operation on an Organization constituent record, you might encounter the error, "Error: Data could not be saved. The DELETE statement conflicted with the REFERENCE constraint "FK_BATCHREVENUEENHANCEDMATCHINGGIFTS_RELATIONSHIPID". The conflict occurred in database [NAME], table dbo.BATCHREVENUEENHANCEDMATCHINGGIFTS column RELATIONSHIPID"
This issue is associated with converted relationships. In one instance, the former employee/employer relationship did not exist in the RELATIONSHIP table but did exist in the BATCHREVENUEENHANCEDMATCHINGGIFTS table. To find the relationship referenced in the error message, run a select statement like below for both of the organizations using the organization's system record ID. 

--Replace the ID in the statement below with the GUID associated with one of the organizations
select * from BATCHREVENUEENHANCEDMATCHINGGIFTS
where organizationid = '32b3a57f-592a-4652-92df-658ee4135a59' 

--Replace the ID in the statement below with the GUID associated with the other organization.
select * from BATCHREVENUEENHANCEDMATCHINGGIFTS
where organizationid = 'd31a400b-5a82-4da2-9936-1ecf0bf804b8'

 

Environment

 Blackbaud CRM

Was this article helpful?