Issue in inserting data to entity.

Hi all,



Facing the following issue in adding data to entity,

Please anyone?


The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_SNY_DAFFILEDATATEST_OSUSR_SNY_DAFFILE_DAFFILEID". The conflict occurred in database "outsys-dev-db-platform", table "dbo.OSUSR_SNY_DAFFILE", column 'ID'.
The statement has been terminated.


Regards,

DM

Check the tables which you are inserting,

I think you are inserting zero value again to the referring child table identifier.

Hi Dhiraj Manwani,

The entity in which you want to store value has one mandatory field DaffileID, this is a foreign key.

The problem is that you are not providing value so it takes default value as 0 But id starts with 1 that's why its raises an error.

see the following link for better understanding. https://www.outsystems.com/forums/discussion/34412/the-insert-statement-conflicted-with-the-foreign-key-constraint/