I'm attempting to change a Pending Check Transaction to a Transfer Out Transaction, but getting 'Reassign failed because original transaction is invalid.
'See if we can Find a Pending Check and Change it to a Transfer Out
Dim findCheck As ITransactionInfo = tm.Transactions.Where(Function(ti) _
(ti.IsCurrent) AndAlso (ti.Ledger.ID = orderLedger.ID) AndAlso (Not ti.IsDeleted)).ToList().Where(Function(ti) _
(ti.Kind = TransactionKind.Check) AndAlso (ti.Status = TransactionStatus.Pending)).FirstOrDefault()
If Not IsNothing(findCheck) Then
tm.Reassign("Clean Up", findCheck, transferOut)
End If
Could someone provide some sample code, I'm obviously missing something...
You can use the Reassign feature only with posted transactions to move a given transaction from one ledger to another. I think what you are looking for is ITransactionsManager.ChangeType(ITransactionInfo transaction, TransactionKind targetType).