In some C/AL code it performs the line ItemRec.Modify;
This line (identified via debugging/stepping) according to SQL Profiler causes a Select to be made against the Item table and then an update to set ‘stock to transfer’ = 0 on the Item table
The problem I have got is that I cannot find in the C/AL code for this form any reference to this field at all, even back in the item table triggers.
So my question is, how does the modify command determine which fields to update especially given the lack of code referencing this field?
You can use the xRec.fiend and Rec.field to compare the modified field through C/AL. Based on the value changes in both the recordset you can modify that field.
The problem is that the MODIFY command only updates 1 field and that field is not referenced anywhere in the C/AL code or SQL triggers.
So what I am after is how does Navision evaluate which field to update, not how would a human do it via C/AL code and anyway the value of this field does not change it is always 0.
What version of Navision (I don’t have this field in our 5.0 database). What is the field no. of this field? Did you check the OnModify code and follow it through to make sure there are no references to this field. If you have developers toolkit do a where used on the “Stock To Transfer” field to see where this might be happening.
After all those questions here’s the one that may be your answer: Is it a flowfield? If it’s a flowfield I might expected it to do what you are seeing.
What I meant to say from the last post (it won’t let me edit it) is to check the Update trigger in SQL. This is another spot where something could be happening.