Cash Book Receipts, getting the InvRemitNo
When a cash book receipt is done for a debtor transaction, the users allocate the receipt to whatever invoice is relevant.
I know that the CashBookTransaction has a property, Allocations - which is a collection of allocation records - the allocation has a property, DebtorCreditorTransactionKey - which is the index key into the DebtorTransactions.
I assume that is how I can get the InvRemitNo(s) for the allocated invoices?
I can't work out the syntax to use the DebtorCreditorTransactionKey.
And can't see which event is the most applicable?
Would it be
or
My goal is to get all the allocated invoices listed (just a comma or space separated string is fine) in the Remark property, therefore when the cash book is activated that remark should flow through to the debtor trans. Credit pane.
EDIT: So I have nutted out the attached plugin.
It almost works but when I have a multi line receipt batch, different debtors on each row, the allocated invoices from every row populates.
I know that the CashBookTransaction has a property, Allocations - which is a collection of allocation records - the allocation has a property, DebtorCreditorTransactionKey - which is the index key into the DebtorTransactions.
I assume that is how I can get the InvRemitNo(s) for the allocated invoices?
I can't work out the syntax to use the DebtorCreditorTransactionKey.
And can't see which event is the most applicable?
Would it be
- Code: Select all
cashbkRctsForm.CashBook.CashBookTransactions.Changed
or
- Code: Select all
cashbkRctsForm.CashBook.CashBookTransactions.AllocationChanged
My goal is to get all the allocated invoices listed (just a comma or space separated string is fine) in the Remark property, therefore when the cash book is activated that remark should flow through to the debtor trans. Credit pane.
EDIT: So I have nutted out the attached plugin.
It almost works but when I have a multi line receipt batch, different debtors on each row, the allocated invoices from every row populates.