Dear experts,
how many choices do we have in order to delete an instance of a customer BO?
e.g.
businessobject MyCustomBO {
[AlternativeKey ] element ID : ID;
element e1 : aType;
...
}
Right now I only know 1 way which is using a stackpanel in OWL --> eventhandler --> list --> remove row --> bind to data list
In the documentation, there is a short paragraph: but it does not delete the BO in the root level but the node beneath it.
@Fred K has suggest another workaround in the comment of the post How Queries and DefaultSets work on OWL but it does not work for me.
Much appreciate your help.
Best regards
Linh
7.2.4.19 Delete Instance (Business Logic)
Syntax <this | NodeInstanceVar>.Delete();
Description The Delete operation, which uses the inverse semantics of the Create operation, can only be called in the
instance-based variant and must be applied to business object nodes. The reason is that the instance to
be deleted must be identified by the preceding member path expression. The Delete operation can also be
applied to collections of business object nodes.
Example foreach (var BO in TestBO.QueryByElements.Execute()) {
if (BO.Name == "delete") {
BO.Delete();
}
}
Deletion of a collection of nodes:
TestBO.QueryByElements.Execute().Delete()