# PromoteItems **EventNames:** - PromoteItems_Restrictions - PromoteItems_Pre - PromoteItems_Post **Parameters** | Type | Name | Description | |---------------------------------------------------|------------|----------------------------------------------------------------------------------------------------------------------| | [File[]](inv:powervault#code_reference/objects/file) | files | The files which should get / are assigned to the items. | | [Item[]](inv:powervault#code_reference/objects/item) | items | The items which should get / are assigned to the files. | | bool | successful | **Post**:
The information whether the Web Service call was successful or not is only available in *Post* events. | :::{admonition} Unexpected Behaviour :class: warning **PromoteItems event** is raised when clicking "*Assign / Update Item*" on a file or "*Update...*" on a item and afterwards *EditItem* event is fired - When "*Assign / Update Item*" on a file is clicked wheter the item exists or not, you will *only get data about the files* - When "*Update...*" on an item is clicked, you will *only get data about the items* - Changing item category does not fire any event. ::: **Examples:**\ PromoteItems_Restrictions: ```powershell Register-VaultEvent -EventName PromoteItems_Restrictions -Action 'RestrictPromoteItems' function RestrictPromoteItems($files, $items) { #Write event code here } ``` PromoteItems_Pre: ```powershell Register-VaultEvent -EventName PromoteItems_Pre -Action 'PrePromoteItems' function PrePromoteItems($files, $items) { #Write event code here } ``` PromoteItems_Post: ```powershell Register-VaultEvent -EventName PromoteItems_Post -Action 'PostPromoteItems' function PostPromoteItems($files, $items, $successful) { #Write event code here } ```