Question

Foreign Key Constraint Error

While creating an activity in the activity section I am getting the following error.

Terrasoft.Common.DbOperationException: Npgsql.PostgresException (0x80004005): 23503: insert or update on table "Activity" violates foreign key constraint "FK8k9PLTrOuC7utdecSZ0EIBziLQo"

Image preview 

Like 0

Like

1 comments

Hello Janhavi,

 

Hope you're doing well.

 

The notification you have received occurs at the database level and means that the database cannot update the table due to invalid constraints. If you look at what this constraint is and what it is referring to, you can find what it refers to (in your case it's an Activity object). It seems that the Activity object was changed or related objects were changed (like adding new columns, removing columns/obects, editing column names, etc.), and this could be the reason of the issue you have faced. In this case to solve the issue please try to update the database structure where it is needed or additionaly before that run the source code generation and compile the system ("Compile All" option):

 

 

Also you can find the needed relation for the mentioned in the norification constraint by running the next query:

 

SELECT * FROM information_schema.constraint_column_usage WHERE constraint_name = 'FK8k9PLTrOuC7utdecSZ0EIBziLQo';

 

Best regards,

Roman

Show all comments