UpdateChangeOrderState

EventNames:

  • UpdateChangeOrderState_Restrictions

  • UpdateChangeOrderState_Pre

  • UpdateChangeOrderState_Post

Parameters

Type

Name

Description

ChangeOrder

changeOrder

The Change Order in Vault for which the lifefycle status changes/was changed.Restrictions and Pre:
In these events you can get the future state changes through the special property _NewStateEntered.

Post:
In this event you can retrieve the information from previous events 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 the _Post event.

Unexpected Behaviour

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:

Register-VaultEvent -EventName UpdateChangeOrderState_Restrictions -Action 'RestrictUpdateChangeOrderState'

function RestrictUpdateChangeOrderState($changeOrder, $activity, $comments, $emails) {
	#Write event code here
}

UpdateChangeOrderState_Pre:

Register-VaultEvent -EventName UpdateChangeOrderState_Pre -Action 'PreUpdateChangeOrderState'

function PreUpdateChangeOrderState($changeOrder, $activity, $comments, $emails) {
	#Write event code here
}

UpdateChangeOrderState_Post:

Register-VaultEvent -EventName UpdateChangeOrderState_Post -Action 'PostUpdateChangeOrderState'

function PostUpdateChangeOrderState($changeOrder, $activity, $comments, $emails, $successful) {
	#Write event code here
}