Reassign Transaction

Discussions related to custom development with Select.
Post Reply
tmeisinger
Posts: 75
Joined: Fri Apr 24, 2015 10:33 am

Reassign Transaction

Post by tmeisinger »

I'm attempting to change a Pending Check Transaction to a Transfer Out Transaction, but getting 'Reassign failed because original transaction is invalid.

Code: Select all

'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...

Thanks in advance,
-TM
sindrapal
Posts: 42
Joined: Tue Oct 14, 2008 9:21 am

Re: Reassign Transaction

Post by sindrapal »

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).
tmeisinger
Posts: 75
Joined: Fri Apr 24, 2015 10:33 am

Re: Reassign Transaction

Post by tmeisinger »

Thanks
Post Reply