You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ConvertTo-Json -AsArray -Depth 5 both throw an error. Incressed this to 10 its fine. That said I have tried to run through the code and cannot receate line by line. Its not posting all the batches and I end up getting error like
Failed to Save Payments - The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
"Failed to save Invoice Lines - The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
Failed to Save Payments - The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions."
"Failed to save Invoice Lines - An error occurred while saving the entity changes. See the inner exception for details. - Inner Exception: Violation of PRIMARY KEY constraint 'aaaaaInvoiceDetail_PK1'. Cannot insert duplicate key in object 'dbo.INVOICEDETAIL'. The duplicate key value is (28758).
The statement has been terminated.
Failed to Save Payments - An error occurred while saving the entity changes. See the inner exception for details. - Inner Exception: Violation of PRIMARY KEY constraint 'aaaaaInvoiceDetail_PK1'. Cannot insert duplicate key in object 'dbo.INVOICEDETAIL'. The duplicate key value is (28758).
The statement has been terminated."
It seems to work fine just passing one part of the array to New-HaloRecurringInvoice eg;
New-HaloRecurringInvoice $allPayloads | Where-Object { $_.schedule_id -eq 1821 }
Version
2.184.7
Which operating systems have you tested on?
Windows 10
Windows 11
Mac OS
Linux
What PowerShell version are you running?
7
Halo Product
Halo PSA
Halo Version
2.184.7
What command did you run?
What was the output of the command?
The text was updated successfully, but these errors were encountered:
Done a bit more digging its to do with the [Array[]] thats in line 15 of New-HaloRecurringInvoiceBatch. Thouhg maybe its because its also already a Array
Contact Details
jamie@fitm.co.uk
What happened?
The ConvertTo-Json -AsArray -Depth 5 both throw an error. Incressed this to 10 its fine. That said I have tried to run through the code and cannot receate line by line. Its not posting all the batches and I end up getting error like
Failed to Save Payments - The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
"Failed to save Invoice Lines - The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
Failed to Save Payments - The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions."
"Failed to save Invoice Lines - An error occurred while saving the entity changes. See the inner exception for details. - Inner Exception: Violation of PRIMARY KEY constraint 'aaaaaInvoiceDetail_PK1'. Cannot insert duplicate key in object 'dbo.INVOICEDETAIL'. The duplicate key value is (28758).
The statement has been terminated.
Failed to Save Payments - An error occurred while saving the entity changes. See the inner exception for details. - Inner Exception: Violation of PRIMARY KEY constraint 'aaaaaInvoiceDetail_PK1'. Cannot insert duplicate key in object 'dbo.INVOICEDETAIL'. The duplicate key value is (28758).
The statement has been terminated."
It seems to work fine just passing one part of the array to New-HaloRecurringInvoice eg;
New-HaloRecurringInvoice $allPayloads | Where-Object { $_.schedule_id -eq 1821 }
Version
2.184.7
Which operating systems have you tested on?
What PowerShell version are you running?
7
Halo Product
Halo PSA
Halo Version
2.184.7
What command did you run?
What was the output of the command?
The text was updated successfully, but these errors were encountered: