Question

Deleting a Contact from DB

Hi,

I am trying to delete the Contact associated with the Account using the script: Delete from Contact where AccountId = (select ID from Account where Name = 'Axiom') and getting an error message: 

Msg 547, Level 16, State 0, Procedure TRContactID, Line 12
The DELETE statement conflicted with the REFERENCE constraint "FKtcriuWk8BZRa43qgkvz6wt0eL8". The conflict occurred in database "BPMonline710SoftkeyENU", table "dbo.Activity", column 'ContactId'.
The statement has been terminated.

Can you help me with this?

File attachments

Like

1 comments

Hi Matthew,

This message informs you, that there are records in the Activities Section associated with this Contact and that is why system doesn't let you delete it. If it is really necessary, then you can disconnect the Contact from other records and then delete it. You can use this script for it  script.txt . Please make sure you create a DB backup before performing any scripts to make sure your data will be saved.

Show all comments