CommitItems

EventNames:

  • CommitItems_Restrictions

  • CommitItems_Pre

  • CommitItems_Post

Parameters

Type

Name

Description

Item[]

items

The items which should get / is comited.

Restrictions and Pre:
In Restrictions and Pre you have the future data set on this object like _NewNumber, _NewTitle(Item,CO), _NewDescription(Item,CO), _NewComment and _NewUnits.

Post:
In POST you can retrieve the previous information by using the properties _OldNumber, _OldTitle(Item,CO), _OldDescription(Item,CO), _OldComment and _OldUnits.

bool

successful

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

Unexpected Behaviour

CommitItems: is raised when clicking in the item dialog on Save or Save and Close.

When changing Item number via the Vault Client, the properties _Number, _NewNumber and _OldNumber have the same value.
This happens because the API call ItemService.CommitItemNumbers already changes the number on the item that is still in edit-mode.

When committing an Item which has a Comment, the properties _Comment and _OldComment will be empty because the comment will be automatically cleared from the previous API call ItemService.EditItems.

Examples:
CommitItems_Restrictions:

Register-VaultEvent -EventName CommitItems_Restrictions -Action 'RestrictCommitItems'

function RestrictCommitItems($items) {
	#Write event code here
}

CommitItems_Pre:

Register-VaultEvent -EventName CommitItems_Pre -Action 'PreCommitItems'

function PreCommitItems($items) {
	#Write event code here
}

CommitItems_Post:

Register-VaultEvent -EventName CommitItems_Post -Action 'PostCommitItems'

function PostCommitItems($items, $successful) {
	#Write event code here
}