How to create a CreateOrUpdate action when two or more tables have relationship?

How to create a CreateOrUpdate action when two or more tables have relationship?

We have three tables [1,2,3] and they're connected via a common Identifier. Two of them have a shared identifier [1,2] and one of them only have a connection to the other table [inheritance].

We're having trouble to create a CreateOrUpdate it seems not to work at all.

Thanks for the help.

Hi, 

1. You need first do the CreateOrUpdateEmpresa for the Empresa entity. 

2. After this in the logic, you need to assign the returned Id from the CreateOrUpdateEmpresa to the record of the Cliente entity, and then do the CreateOrUpdateCliente action, as this last one is an extension of the first, and so it needs the ID of the first as its own ID.

3. Than you can execute the CreateOrUpdateContato, as you need the returned ID from the CreateOrUpdateEmpresa as source to the EmpresaId foreign key in the Contato record.

Hope this helps

Cheers