Delete Constrain

Delete Constrain

  

Hi all,


i get the folowing message when i try to delete user record

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSLTM_SYNCUSERS_OSSYS_USER_USERID". The conflict occurred in database "XH3T80026", table "dbo.OSLTM_SYNCUSERS", column 'USERID'.
The statement has been terminated.

i managed to keep all references for UserId either Delete or ignore.

i can't figure out what's the issue ?

Hello Bil,

Are you sure that you aren't missing a reference in table SyncUsers?

Maybe you forgot to refresh the reference after a modification?

Cheers,

Eduardo Jauch

I agree with Eduardo. Please try updating the references prior to publish.

Eduardo Jauch wrote:

Hello Bil,

Are you sure that you aren't missing a reference in table SyncUsers?

Maybe you forgot to refresh the reference after a modification?

Cheers,

Eduardo Jauch

Hi Eduardo,

What is strange for me is that i don't have a Table called "Sync Users". I thought it\s a system entity but i can't find it.

Could you tell me exactly what references to update; do you mean dependencies ?? if yes, i did with no progress


Hi,

Probably you have other applications with entities that make reference to the UserId you are trying to delete...

Hi Bil,

Why would you be making changes on Lifetime tables? What was your issue to start with?

Tiago Neves wrote:

Hi Bil,

Why would you be making changes on Lifetime tables? What was your issue to start with?


I confirm that i didn't do so. I found that error message referencing table called Sync Users and by searching i found that it's part of the Lifetime engine module. That's it

Hi Bil,

As I said to you on another post, you should be getting some support from OutSystems shortly.

But I'm curious anyway on what you were trying to achieve. We can probably help you on that as you are on a Trial license and probably exploring ;)

Cheers,

Tiago

Solution

Hello Bil,

As was stated in another post, the SyncUsers table is part of the LifeTime.
Because it points to records in the User table, you will not be able to DELETE User records.

In any case, usually this is not possible anyway. And not necessary too.

Usually the license creates a limit on the number of users.
To avoid get without available "space" to create users, you are not required to delete them.
Just mark them as "Inactive".

An "Inactive" user can't "login" (with the default system, at least), but he also do not count to the limit of users.

Cheers,

Eduardo Jauch


Solution

Eduardo Jauch wrote:

Hello Bil,

As was stated in another post, the SyncUsers table is part of the LifeTime.
Because it points to records in the User table, you will not be able to DELETE User records.

In any case, usually this is not possible anyway. And not necessary too.

Usually the license creates a limit on the number of users.
To avoid get without available "space" to create users, you are not required to delete them.
Just mark them as "Inactive".

An "Inactive" user can't "login" (with the default system, at least), but he also do not count to the limit of users.

Cheers,

Eduardo Jauch


Good morning Eduardo,

Apart from the problem i have now, it's surprising for me that Outsystem is limiting the number of users for the Free plan. I'm using Outsystem and recommending it for my friends since 2014 and i was able to add/ delete users easily. I'm sad that Outsystem started to put restrictions on usage for the Free plan that wasn't there before. Technically they should even remove the Delete user Action from the User module to prevent further usage of it.

From my point of view if Outsystem is going to limit the number of users, i shall be able to delete fake account i create myself to test functionality of some logics i build on system, marking it inactive keeps some mess around.

Logically, marking Inactive won't save space, it will waste it.

I hope that my message reaches the business development team in Outsystem.


Hi,

I'm having same problem on our development environment:

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSLTM_SYNCUSERS_OSSYS_USER_USERID". The conflict occurred in database "FC062D019", table "dbo.OSLTM_SYNCUSERS", column 'USERID'.
The statement has been terminated.


On production the user delete action runs without any problems.

It was working ok and there were no changes on our side to this flow.

How can we fix it without redoing flow to inactivate users instead of deleting them?

Thank you.


The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSUSR_Y9W_CUSTOMER2_OSSYS_USER_USER". The conflict occurred in database "D5LPDW028", table "dbo.OSUSR_Y9W_CUSTOMER2", column 'USER'. The statement has been terminated.


Hi Marcelo, 

You have, in your table Customer, you have at least ONE record that points to the user you are trying to delete, though a FK in this table.
As so, and because the Delete Rule of this FK is probably Protect, You will not be able to delete this user.

This is not related to the issue discussed here, anyway.

Cheers,
Eduardo Jauch

thanks...
if I altered my permissions to an application it has total possibility of managing the users