GX15 U4 BC InsertOrUpdate and problem with Nulls

1

I'm doing an "InsertOrUpdate" in a collection of "Purchases" which is a transaction with a subset of attributes from the "Documents" table.

This is giving me a foreign key error which I attached at the end with the EmployerId attribute which has the property Nullable = true and does not belong to the Shopping transaction.

I see that I see that in the insert, it is taking all the attributes of the table and not only those of the transaction Purchases.

It is known that in the BC "Empty as null" does not work, so I added the attribute to the transaction and I established & Purchase.EmployerId.SetNull (). Keep giving the error ...

Any clues?

    
asked by dmonza 15.07.2017 в 00:44
source

2 answers

1

I managed to leave it running. As I mentioned, I added the attribute to the transaction (although it has the nullable property) and I had to add it not visible to the transaction so that SetNull works correctly in the BC.

Rare casuistry but stay.

    
answered by 15.07.2017 в 00:55
0

I think you could also solve it in the following way:

&Compra.EmpleadorId = NullValue(EmpleadorId)
    
answered by 15.07.2017 в 04:55