# Transfer-Items This function is executed when clicking the "Transfer" button within the {ref}`Item Tab `.\ All the [Items](/code_reference/commandlets/show-bomwindow/objects/item) from the BOM Window can be transferred to to ERP. ## Syntax ```powershell Transfer-Items [-Items] ``` ## Parameters | Type | Name | Description | input/output | Mandatory | Default value | |---------------------------------------------------------------------|-------|--------------------------------------|--------------|-----------|---------------| | [Item](/code_reference/commandlets/show-bomwindow/objects/bom) \[\] | Items | The Items which should be transfered | input | yes | | ## Return type **void** ## Remarks Each **unique** [Item](/code_reference/commandlets/show-bomwindow/objects/item) shown in the BOM Window with another [](/bom_window/status) then *Unknown* will be passed to this function. It is recommended to update the [](/bom_window/status) of all the Items with the [](/code_reference/commandlets/show-bomwindow/commandlets/update-bomwindowentity) cmdlet. When an exception is thrown within this function, the BOM Window {ref}`shows the Exception ` message of the terminated Transfer operation.\ The [](/bom_window/status) of all the [Items](/code_reference/commandlets/show-bomwindow/objects/item) that where not updated, gets automatically changed to *Unknown*. ## Examples **Remove all the items with Status "Remove" from ERP. When operation succeeded the item gets removed from the Dialog, otherwise item is marked as "Error":** ```powershell 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 }else{ $item | Update-BomWindowEntity -Status 'Error' -StatusDetails "Error occured when removing item: $($Error[0].Exception.Message)" } } } } ```