I'm having some trouble determining when to use the e.Row properties or cache.SetValue/SetValueExt when updating the value of a record. In the T200 course, there's a portion from the pdf that says,
To update a field that is defined after the current field in the data access class, use the properties of the e.Row data record as follows.
ShipmentLine line = e.Row as ShipmentLine;
...
line.Description
To update a field that is defined before the current field in the data access class, use the SetValueExt<>() method:
sender.SetValueExt<ShipmentLine.ProductID>(e.Row, GiftCardID);
In these cases, what are they referring to when they say "before" and "after"? If my DAC field declaration is in the order below:
Field1 {get;set;}
Field2 {get;set;}
Field3 {get;set;}
Do they literally mean, if I'm in "Field2.FieldUpdated()" I would have to update Field1 and Field3 like so?
sender.SetValueExt<ShipmentLine.Field1>(e.Row, "X");
line.Field3 = "X";
Also, are there some hard rules on when to use which method? I.e. if in a RowUpdated event, use "X", if in a FieldUpdated event, use "Y".