An update unit is used to track the events occurring when an update is applied. One of the development environment units contained in the update can be set as update unit.
To declare the unit as an update unit, select the Declare as Update Unit item in the unit's context menu. After executing the operation the unit will be declared as an update unit and moved to the beginning of the list of update objects.
The example of displaying the update unit in the update structure:

The body of this unit must contain the CUpdateEvents class inherited from the UpdateEvents class and containing the implementation of its methods, for example:
Public Class CUpdateEvents: UpdateEvents
// Start update
Public Sub OnBeginUpdate(Update: IMetabaseUpdate);
Begin
End Sub OnBeginUpdate;
// Check if objects are ready for update
Public Sub OnBeforeApplyUpdate(Update: IMetabaseUpdate);
Begin
End Sub OnBeforeApplyUpdate;
// Handle constraint of data integrity of updated object.
Public Sub OnAskConstraintsHandling(Update: IMetabaseUpdate; Node: IMetabaseUpdateNode; Details: String; Var Handling: UpdateDataConstraintsHandlingType);
Begin
End Sub OnAskConstraintsHandling;
// Update permissions
Public Sub OnAskReflectRights(Var Cancel: Boolean);
Begin
End Sub OnAskReflectRights;
// Update objects
Public Sub OnUpdateObject(Update: IMetabaseUpdate; CurrentNode: IMetabaseUpdateNode;
Var Skip: Boolean);
Begin
End Sub OnUpdateObject;
// End update
Public Sub OnEndUpdate(Update: IMetabaseUpdate);
Begin
End Sub OnEndUpdate;
End Class CUpdateEvents;
See also: