Custom Entity Events

EventNames:

  • UpdateCustomEntityStates_Restrictions

  • UpdateCustomEntityStates_Pre

  • UpdateCustomEntityStates_Post

Parameters

Type

Name

Description

CustomObject[]

customObjects

The updated / updating customObjects for a LifeCycle.

Restrictions and Pre:
In Restrictions and Pre you could get the future changes by the special properties _NewState, _NewLifeCycleDefinition and _NewComment.

Post:
In Post you could get the old information by the special properties _OldState, _OldLifeCycleDefinition and _OldComment

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Unexpected Behaviour

For the UpdateCustomEntityStates_Post event the property _OldComment will always be empty because the VaultAPI currently does not support Comments on CustomObjects (it is reserved for future use).

Examples:
UpdateCustomEntityStates_Restrictions:

Register-VaultEvent -EventName UpdateCustomEntityStates_Restrictions -Action 'RestrictUpdateCustomEntityStates'

function RestrictUpdateCustomEntityStates($customObjects) {
	#Write event code here
}

UpdateCustomEntityStates_Pre:

Register-VaultEvent -EventName UpdateCustomEntityStates_Pre -Action 'PreUpdateCustomEntityStates'

function PreUpdateCustomEntityStates($customObjects) {
	#Write event code here
}

UpdateCustomEntityStates_Post:

Register-VaultEvent -EventName UpdateCustomEntityStates_Post -Action 'PostUpdateCustomEntityStates'

function PostUpdateCustomEntityStates($customObjects, $successful) {
#Write event code here
}