$dropBranch

Function $dropBranch drops the current branch and all of its children branches and subfolders.
Syntax
    $dropBranch{}
DocumentationFunction $dropBranch drops the current branch and all of its children branches and subfolders.

    Returns:
      the number of all droped branches.
    Throws:
      java.lang.SecurityException if the requestor user has not the access named 'ACCESS_DELETE' for the current branch.
    Note:
      the removed branch and its children are still referenced in the 'WordTable' table after dropping. Those references must be removed manualy.

      a root branch (account) can not be removed.
Examples
Removing current branch:

    $//Check if the current user has the rights to delete the current branch.
    $if{$hasAccess{ACCESS_DELETE}}
      {
      $// Get the id of the current branch.
      $set{branchID}{$getCurrent{b}}

      $//Remove all references of the current branch in the 'WordTable' table.
      $sql{delete * from WordTable where Branch=$get{branchID}}

      $//Remove all references of the current branch children in the 'WordTable' table.
      $forEach{id}{$getChildren{$get{branchID}}}
        {
        $sql{delete * from WordTable where Branch=$get{id}}
        }
        {$\ }
        {$getChildCount{1}}

      $//Remove the current branch.
      $dropBranch{}
      }
GroupBranch
Minimum required transaction-mode:UPDATE=TREE
Required scripting permission of the developerPERMISSION_FL_BASIC
Minimum parameters0
Maximum parameters 0