DeleteObject(Key: Integer);
Key. Key of the object that is being deleted.
The DeleteObject method deletes an object, which key is passed by the Key input parameter.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB : IMetabase;
ObjKey: Integer;
Begin
MB := MetabaseClass.Active;
ObjKey := MB.GetObjectKeyById("TestObj");
If ObjKey <> -1 Then
MB.DeleteObject(ObjKey);
End If;
End Sub UserProc;
After executing the example if there is an object with the TestObj identifier in the repository, it is deleted.
See also: