Skip to content

Commit

Permalink
correct jobtype name, removed message boxes used for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TollJulian committed Jun 28, 2022
1 parent 8efcaed commit 5dbdc50
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Files/powerEvents/Events/ErpService.Lifecycle.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,10 @@ Register-VaultEvent -EventName UpdateItemStates_Post -Action 'AddItemPdfJob'
function AddItemPdfJob($items) {
Log -Begin
try {
[System.Windows.MessageBox]::Show("event triggered")
$releasedItems = @($items | Where-Object { $_._ReleasedRevision -eq $true})
foreach ($item in $releasedItems) {
[System.Windows.MessageBox]::Show("event triggered for item $($item._Name)")
$jobType = "ErpService.CreatePDFFromItem"
$jobType = "Erp.Service.CreatePDFFromItem"
Write-Host "Adding job '$jobType' for item '$($item._Name)' to queue."
[System.Windows.MessageBox]::Show("Adding job '$jobType' for item '$($item._Name)' to queue.")
Add-VaultJob -Name $jobType -Parameters @{ "EntityId" = $item.Id; "EntityClassId" = "ITEM" } -Description "Create PDF for item '$($item._Name)' and upload to ERP system" -Priority 101
}
}
Expand Down

0 comments on commit 5dbdc50

Please sign in to comment.