Class_: String;
The Class_ property determines the name of the class, in which event handlers are implemented.
The specified class must contain implemented methods having the following signature:
Class <Class name>: Object
Sub OnBeforeSave(<Parameter 1>: IMetabaseObject; Parameter 2: IMetabaseObject);
Begin
//...
End Sub OnBeforeSave;
Sub OnAfterSave(<Parameter 1>: IMetabaseObject; <Parameter 2>: IException);
Begin
//...
End Sub OnAfterSave;
End Class <Class name>;
The OnBeforeSave event occurs before saving object metadata. The first parameter allows for getting the source object before change, the second parameter allows for getting the source object with changes and before saving.
The OnAfterSave event occurs after saving changes, the first parameter allows for getting the changed object, the second parameter returns a possible change error.
IMPORTANT. It is forbidden to make additional changes to the saved object in the OnBeforeSave event.
IMPORTANT. It is forbidden to edit and save other repository objects. This may result in recursive events and platform freeze.
The property use is given in the example for ISaveMetabaseObjectHandlers.Add.
See also: