630
Views
6
Comments
Solved
The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSUSR_14O_GROUP_
Application Type
Reactive

I am getting this error deleting an user; I don't see the group_manager entity anyway. 

Any ideas how to fix it?  Thanks

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSUSR_14O_GROUP_MANAGER_OSSYS_USER_GRANTEDBY". The conflict occurred in database "OSDEV1", table "dbo.OSUSR_14O_GROUP_MANAGER", column 'GRANTEDBY'.
The statement has been terminated. 

2021-06-02 20-50-04
Márcio Carvalho
Solution

Can you share your OML?

https://www.outsystems.com/forums/discussion/56928/how-to-generate-an-oml-file/

You can always find it in the dependencies or even in the references of your module. But remember that you have to change the delete rule on the foreign key and not on the entity that is being referenced on the entity that is giving you that error.

Regards,

Márcio

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

Hi Robert Lou ,

 you need to change the GRANTEDBY  attribute   Delete Rule  property  Protect to  " Delete " of GROUP_MANAGER  table .

Thanks


2021-06-02 20-50-04
Márcio Carvalho

Or you delete yourself the record from the other entity where you have a reference or you can do what @KUNDAN CHAUHAN said to do.

There is another delete rule, ignore where even if you delete something that has reference to another entity you will be able to delete and the record from the other entity will not delete in cascade.

Have a look at the rules. And have a look as well on the forums, there are a lot of similar questions about this topic.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships/Delete_Rules?_gl=1*1qmnb5z*_ga*MTc5Nzg1NzgxOS4xNjUyNzQ4Mjk4*_ga_ZD4DTMHWR2*MTY2MDY2ODk2MC42MjEuMS4xNjYwNjY5MTYwLjUw

Kind Regards,

Márcio

UserImage.jpg
Robert Lou

My issue is I can not find the group_manager table anyway; is it an internal table?

2021-06-02 20-50-04
Márcio Carvalho
Solution

Can you share your OML?

https://www.outsystems.com/forums/discussion/56928/how-to-generate-an-oml-file/

You can always find it in the dependencies or even in the references of your module. But remember that you have to change the delete rule on the foreign key and not on the entity that is being referenced on the entity that is giving you that error.

Regards,

Márcio

UserImage.jpg
Robert Lou

I can not provide you the OML file; btw, I just upgraded to OutSystems 11.16.1.

UserImage.jpg
Robert Lou

Hi Marcio, 

Thank you so much; I found the group_manager table like you described in your post.

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