Sequence of Events: Update of a Data Record
The figure below illustrates the sequence of events raised during the update of a data record.
A data record is updated when a user modifies the data record on the user interface, the
request is sent through the Web Service API, or the Update()
method is
invoked on the data view. Updated data records, which the system gives the
Updated status, are later available through the
Updated and Dirty collections of the appropriate
PXCache object.
The RowUpdating event is fired before the update happens, while the RowUpdated event is fired after the update. The developer can handle these events and has access to the updated data record and the previous version of the data record that is kept in the PXCache object. The actual update happens between these two events when the data record is copied to the PXCache object.
FieldUpdating
FieldVerifying
FieldUpdated
RowUpdating
is raised. At this moment, in thee
variable, which represents event data,e.Row
holds the data record version from the cache, whilee.NewRow
holds the updated data record. You can still stop the update by throwing a PXException instance.- If
e.Cancel
does not equaltrue
:RowSelected
is raised. Only the updated data record can be accessed throughe.Row
.RowUpdated
is raised.e.Row
now holds the updated instance, whilee.OldRow
holds a copy of the old data record with the previous values.