I have 2 weeks trying to figure out what is happening with my Patch statement. I am pretty close but my knowledge is limited in such way I am almost giving up. Already read hundred of pages between google sources and this forum trying to sort it out. Let's see if you can help me.
I am trying to patch a collection that contains all my updates back to my datasource in dataverse.
First, I use this statement to populate the collection with my DS fields
ClearCollect(CPOItemsChanges,Defaults('T-Purchase Order Items'));
Clear(CPOItemsChanges)
Then On my gallery I am able to capture all the changes into this collection by using the update or collect functions to change only these fields on the collection.
{
crcbb_tpurchaseorderitemsid:ThisItem.'T-Purchase Order Items',
crcbb_description: tdescription.Text,
crcbb_item: Value(titem.Text),
crcbb_part: tpart.Text,
crcbb_qty: Value(tqty.Text),
crcbb_taccountid: taccount.Selected,
crcbb_total: Value(ttotal.Text),
crcbb_tpurchaseorderid: GalPurchaseOrders.Selected,
crcbb_tvesselid: tvessel.Selected,
crcbb_unitvalue: Value(tunitvalue.Text)
}.
Now comes the issue. I am trying to patch this collection back to the same datasource by using this function:
Patch( 'T-Purchase Order Items', CPOItemsChanges )
and I get the error:

Now, if I drop the 3 lookup columns (
crcbb_taccountid and crcbb_tvesselid and crcbb_tpurchaseorderid ) the patch function works and all the remaining fields are updated accordingly.
Patch(
'T-Purchase Order Items',
DropColumns(CPOItemsChanges,"crcbb_tvesselid","crcbb_taccountid","crcbb_tpurchaseorderid")
);
Any idea of what is this error about?
BTW, this is the collection showing one of this lookup fields. All those 3 fields are listed as Record.

Even knowing that I can use forall as well (with loss in performance) I tried, but got the same error.
Then, at this stage, I think the important here is to know why that is happening.
:
Thanks,
Leo