I was wondering if there was a way to get vault change orders and export them as a csv,
Trying to use $vault.changeorderservice.getchangeorderbynumber but just getting all sorts of errors.
Exception calling "GetChangeOrderByNumber" with "1" argument(s): "1608"
To be able to assist you better i'll need some more information:
The exception you are receiving indicates that no Change Order with the passed number was found. Does it exist in Vault?
my apologies! it seems that powervault had stopped functioning correctly and needed to be rebooted
as for the second part, is there a way to get all changeorders?
You can use the Vault search to get ChangeOrders. Please have a look at this article on the coolOrange knowledge base that shows how to use the API to do searches. You can re use the function "New-SearchCondition" with small modifications such as EntityClassId "CO" instead of "FILE" to get ChangeOrders in "Get-PropertyDefinitionByName"
Then call the function to get the searchConditions to get all ChangeOrders:
$searchConditions = New-SearchCondition -PropertyName "" -searchOperator Contains
and then use:
$vault.ChangeOrderService.FindChangeOrdersBySearchConditions($searchConditions, sortCondition, [ref]$bookmark, [ref]$searchstatus)
After searching for the ChangeOrders using the Vault API search you could export them to CSV e.g. using the Powershell cmdlet Export-Csv.
im not able to get it to work using the instructions provided. i get errors.
any way you will be building these functions into the powervault commandlets?
What kind of errors are you getting?
Can you please send me the script you are using?