The DELETE statement conflicted with the REFERENCE constraint "FK_BATCHREVENUEENHANCEDMATCHINGGIFTS_ORGANIZATIONID". The conflict occurred in database "[DB Name]", table "dbo.BATCHREVENUEENHANCEDMATCHINGGIFTS", column 'ORGANIZATIONID'

When deleting an organization an organization with matching gift claims (even after the matching gift claims have been deleted), the following error is thrown, "Data could not be saved. The DELETE statement conflicted with the REFERENCE constraint "FK_BATCHREVENUEENHANCEDMATCHINGGIFTS_ORGANIZATIONID". The conflict occurred in database "[DB Name]", table "dbo.BATCHREVENUEENHANCEDMATCHINGGIFTS", column 'ORGANIZATIONID'. The statement has been terminated." 
We are currently evaluating this issue for a fix in a future service pack. 

Steps to Duplicate

1) Add an individual constituent
2) Add an organization
3) Give the individual constituent and organization an Employee/Employer relationship with an organization and mark the checkbox indicating the organization will match contributions for this relationship.
4) On the organization record's Organization Info tab, set up the matching gift conditions as below:
Matching factor: 1.00
Applies to: Employee
Revenue type: Gift
5) In an Enhanced Revenue Batch, select the individual constituent and add a Payment with the application type of donation.
6) In the batch go to the Revenue tab > Matching gifts > Make sure you see the matching gift claim > Close the window
7) Update projected totals > Validate > Commit the batch
8) On the organization record go to Revenue > Revenue history > Matching gift claim > Delete the matching gift claim
9) Delete the relationship between the individual
10) Delete the organization and notice you get the error
 

Environment

 Blackbaud CRM
 4.0
 4.0.180

Was this article helpful?