# Remove-BomWindowEntity Removes an entity from the [BOM Window](). ## Syntax ```{code-block} powershell :linenos: true Remove-BomWindowEntity [[-InputObject] ] [] ``` ## Parameters | Type | Name | Description | Optional | |--------------------------------------------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------|----------| | [BomRow]() / [Item]() | InputObject | An entity displayed in the BOM Window. The argument accepts pipeline input | no | ## Return type **empty** ← On failure the Exception/ErrorMessage can be accessed using [\$Error](). ## Remarks The Cmdlets's purpose is to remove a [BomRow]() or an [Item]() from the [BOM Window]().\ When removing a BomRow, the row and the associated Item will be removed together!\ The same applies when removing an Item that depends on a BomRow: the item and the associated [BomRow]() will be removed at the same time. **Restrictions:** - [Items]() that are used in multiple [BOM's]() can not be removed - Only [BomRows]() without any children can be removed ## Examples **Removing an item from the BOM Window:** ```{code-block} powershell :linenos: true $item | Remove-BomWindowEntity ``` **Removing rows from a BOM:** ```{code-block} powershell :linenos: true foreach($bomRow in $bom.Children) { $bomRow | Remove-BomWindowEntity } ``` **Deletes an item when marked as "Remove" and when successfully deleted in ERP:** ```{code-block} powershell :linenos: true function Transfer-Items($items) { foreach($item in $items) { if($item._Status -eq 'Remove'){ $removed = Remove-ERPObject -EntitySet 'Materials' -Keys @{'Number'=$item._PartNumber} if($removed) { $item | Remove-BomWindowEntity } } } } ```