Formulario com erro na chave secundaria

Good Morning,


My version of Outsystems is 11.7.3 ,  Outsystems Server Studio 11 

The application I'm trying to try to create is on the traditional web

I have a user registration form and when I click the Save button, this error appears


A instrução INSERT entra em conflito com a restrição FOREIGN KEY "OSFRK_OSUSR_Y66_UTILIZADOR_OSSYS_USER_IDUSER". O conflito ocorreu no banco de dados "XPHX1U025", tabela "dbo.ossys_User", coluna 'ID'. A instrução foi encerrada"


How can I solve this?
The User entity has these attributes:

ID

DataNasciemento

NDependentes

Salario

Especializacao

CustoHora

TaxaIRS

IdEstadoCivil

IdPais

IdTipoUtilizador

IdUser

--> From this entity I am not using the custohora attribute that I want to be calculated through the salary and IdUser but I have attributes of the original user entity of the outsystems platform.




Hi


You're trying to insert a database record that has a null value on a mandatory field. For a bit more help we need to see the logic flow and the values you're assigning to the created record

Solution

To solve the problem I had to put in the action of registering the form the action to create a user and then the action to create or update the client since my client entity had a reference to the original user class of the platform.



Solution