48
Views
6
Comments
Error Executing Query
Question

Hi guys I'm a new developer here I am having a problem with deleting test user in outsystems whenever I delete test user an error occurs. This always happens. 

2022-12-22 10-00-39
Beatriz Sabino

Hi Axcel,

You mentioned that this error occurs when you're deleting a test user. However, the error shown above is related when creating a new record in the UserExtend entity using an invalid UserId, such as 0.

Could you clarify the flow of this action causing the error? 

2025-04-14 11-22-14
Aditi Saraswat

Hi @Axcel Guarda,

You mentioned that you're encountering this error during user deletion, but typically, this error indicates a database constraint violation—most likely due to an attempt to insert a record without supplying a required UserId value.

Please debug the flow to verify whether the UserId is being set to 0 during the insert operation. Additionally, investigate the delete flow to ensure that the UserId is correctly passed when the delete button is clicked.

Hope this helps.

Thankyou



2023-03-13 10-26-05
Sriyamini

Hi @Axcel Guarda,

It seems that some logic is running after the user deletion that might be trying to insert data into UserExtend entity using the deleted user’s ID which is causing the foreign key violation. Can you please share the .oml file. So it will be easier to look it your problem and give you solution.

Thanks,

Sriyamini.J

  

2019-01-07 16-04-16
Siya
 
MVP

@Axcel Guarda :  Based on the log file, it looks like the error occurs on the signup page (https://personal-wqh6wusa.outsystemscloud.com/PalayProtectorApp/Signup) when someone tries to register. I was able to reproduce the issue using sample data.

The issue is that the user isn’t getting created successfully, and without checking the result of that operation, the flow tries to insert a record into the UserExtended entity. Since the user creation fails, it returns a null UserId, and I assume UserExtended has a one-to-one relationship with the User entity.

Attaching a debugger should help you identify the root cause and fix it. 

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Axcel Guarda ,

Please have a look to the below link first and try to understand the delete rule among your user & user_extend entity.

https://success.outsystems.com/documentation/10/developing_an_application/use_data/data_modeling/entity_relationships/delete_rules/ 

I am not sure about your delete logic or query you are using to delete the user but I believe you need to first delete the user from child entities like user_extend and then you need to delete the user from user entity if relationship is protected. 

Regards,

Manish Jawla

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