Hi everyone ,
i'm new to the outsystems i'm building a Employee Directory project , in that when i tried to built a form validations for phone number i'm facing this error.
The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_BU1_EMPLOYPICTURE_OSUSR_BU1_EMPLOYEE_EMPLOYEEID". The conflict occurred in database "JDJXFE007", table "dbo.OSUSR_BU1_EMPLOYEE", column 'ID'. The statement has been terminated.
https://personal-vwse1mdx.outsystemscloud.com/EmployeeDirectory/EmployeeDetails?EmployeeId=0
Hello
I see the issue was you are not assigning the created, user id while creating a record
So on the image Create update action Null is being passed
Since the employee you are creating you are passing Employee details From the input parameter "Employee" to your CreateOrUpdateEmployee and at the same time you have null inside the Id on your input, so since it is been passed to CreateOrUpdateEmployPicture you need to assign a id of an employee which is been created.
I am attaching a fix here hope this help.
I see the issue is related to foreign key, as it says There might be some assignment which is missing or the Id which we are assigning dosent exist.
if you can attach the Oml we can demonstrate it and fix it and see what is missing here.
ThanksTousif Khan
Hi @Tousif Khan , thanks for responding i'm sharing the oml file here .
Thank you so much @Tousif Khan it's working
Your Welcome :)Glad to help you with thisTousif Khan