377
Views
1
Comments
Solved
How to delete the data from User Entity
Question

I've tried using a server action which includes  SQL to delete the data using the query but it throws an error saying "The DELETE statement conflicted with the REFERENCE constraint "

del users.PNG
2020-02-28 09-46-54
Eduardo Jauch
Solution

Hi Mamini,

This means that you have another entity that has a Foreign Key pointing to this entity with data. So you need to change the DELETE rule of that Foreign Key to DELETE or delete data from THAT entity BEFORE deleting the data in the parent entity.

EDIT: In the case of User entity, there are system entities that also point to it. Traditional way is just to disable the user (set IsActive field to False).

Cheers.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.