Getting an error Deleting a user record

Getting an error Deleting a user record

  

I'm getting the following error attempting to remove a user from the User entity. There are no Group associations and all Role associations were removed prior to programmatically firing the DeleteUser() action. The same error is thrown when I attempt to delete the user with the OutSystems User Utility.

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSUSR_PJE_SUBJECTMEMBER_OSSYS_USER_USERID". The conflict occurred in database "BHYGUT029", table "dbo.OSUSR_PJE_SUBJECTMEMBER", column 'USERID'.
The statement has been terminated.

Any help or direction would be greatly appreciated.

Hi,

Please check data in "SUBJECTMEMBER" for the deleting users.


Thanks!

Hello,

I realize that the UserID column in the SUBJECTMEMBER table has a foreign key association with the Users entity, and a user row cannot be removed from the Users table when the UserID is referenced in another table. However, without access to the BHYGUT029 database using the SQL server query analyzer, I don't see how I can remove the row from the SUBJECTMEMBER table. It's not allowed to reference that table in an advanced query either.

Thoughts?

Solution

Daryl,

That table SubjectMember belongs to an espace you have publish in your environment. You can check on System entities "entity" and "espace" to understand which espace. Normally on systems that we know the users will be deleted we dont use UserID has a Foreign Key but as a simple long integer.

Regards,

Marcelo

Solution

Marcelo Ferreira wrote:

Daryl,

That table SubjectMember belongs to an espace you have publish in your environment. You can check on System entities "entity" and "espace" to understand which espace. Normally on systems that we know the users will be deleted we dont use UserID has a Foreign Key but as a simple long integer.

Regards,

Marcelo

Marcelo,

Thank you for the confirmation. I had started looking for the offending eSpace before posting this question. I just wasn't sure if SubjectMember was a part of OutSystems or not. This should narrow my search quite a bit.


Thanks again!


Daryl

Hi Daryl,

Outsystems tables start with the prefix OSSYS while the other start with the prefix OSUSR.

Regards,

Marcelo