using DI API I'm updating sales orders, changing some field values in their lines.
Debugging I can see that the COM object for order lines (ord.Lines) gets correctly updated in the fields I set.
Also the final ord.Update() returns 0.
But when I check the order line on B1 client (or on the DB) I see that sometimes the old value is still there or sometimes is cleared.
This behaviour seems to be random.
I noticed that in B1 client, when you change an item, many other fields are changed automatically. A similar behaviour occurs via DI API, even for those fields that I change. For instance I change item code and quantity (setting to 2), but in SAP I see that item has changed and quantity has been reset to 1 (the default I guess).
Sometimes I also experienced this: I have 3 fields to change and I need 3 executions to finally change all of them, because they change one by one. It seems that you need to update the order as many times as the fields count to be changed.
I'm disoriented. Has anyone some clues?