# UpdateChangeOrderState **EventNames:** - UpdateChangeOrderState_Restrictions - UpdateChangeOrderState_Pre - UpdateChangeOrderState_Post **Parameters** | Type | Name | Description | | ------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [ChangeOrder]() | changeOrder | The updated / updating Change Order for a LifeCycle.

**Restrictions and Pre:**
In *Restrictions* and *Pre* you have the future data set on this object like `_NewStateEntered`.

**Post:**
In *POST* you can retrieve the previous information by using the properties `_OldState` and `_OldStateEntered`. | | string | activity | The activity being completed. | | [Comment[]]() | comments | Multiple comments for the ChangeOrder including there attached files. | | [Email[]]() | emails | Multiple emails to send out upon completion. | | 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 **UpdateChangeOrderState event** is raised when clicking on *Submit/Approve*, in general when the State/Activity is changed. When fired by **Vault Client** then the property `_NewStateEntered` from the argument **changeOrder** is the StateEntered of the current ChangeOrder! Each comment in the argument **comments** provide negative Ids and only `Subject (CO)`, `Message` and `Attachments` values can be retrieved. All other data is unavailable, even in Post events. ::: **Examples:**\ UpdateChangeOrderState_Restrictions: ```powershell Register-VaultEvent -EventName UpdateChangeOrderState_Restrictions -Action 'RestrictUpdateChangeOrderState' function RestrictUpdateChangeOrderState($changeOrder, $activity, $comments, $emails) { #Write event code here } ``` UpdateChangeOrderState_Pre: ```powershell Register-VaultEvent -EventName UpdateChangeOrderState_Pre -Action 'PreUpdateChangeOrderState' function PreUpdateChangeOrderState($changeOrder, $activity, $comments, $emails) { #Write event code here } ``` UpdateChangeOrderState_Post: ```powershell Register-VaultEvent -EventName UpdateChangeOrderState_Post -Action 'PostUpdateChangeOrderState' function PostUpdateChangeOrderState($changeOrder, $activity, $comments, $emails, $successful) { #Write event code here } ```