34
Views
3
Comments
The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_2LU_ORDE
Service Studio Version
11.53.43 (Build 62091)

I am in how to create and use action logic tutorial in reactive. I followed all the steps on the video but when I was trying to create new order, this error appears 

can someone please help me?

OrdersManagement.oml
OrdersManagement.oml
2021-10-09 07-57-44
Stefan Weber
 
MVP

In the OrderCreateOrUpdate server action you are assigning the GetUserId() function result to the CreatedBy property. CreatedBy is a foreign key to the Employee identifier. Now you the logged in user (getUserId()) does not have a corresponding Employee record (which is an extension to the User entity) you will get the above error. you have to make sure that either the Employee record exists for the current user OR check if the employee record exists and if not create it in the OrderCreateOrUpdate server action.

Best

Stefan

2023-10-30 09-31-27
Shivam Mishra

Hi ,

Mikhel Dela Cruz

You Take A reference of created by in another table  but logic you pass getuserid() .

I solve your problem and attached Oml Please Check 

Thankyou 

OrdersManagementnew.oml
2025-10-18 11-13-53
Ramesh subramanian
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.