Hi all! I've got a tricky one for you. We need to...
# suitescript
k
Hi all! I've got a tricky one for you. We need to send a very specific XML file to our bank of all paid bills minus credits, which requires tracking the relationship between applied transactions and their applied to transactions, and we need to store a "true" value for a custom checkbox when a relationship has been processed so that we do not process it again. This relationship is unfortunately not a record in and of itself so there's no way to add a checkbox to it. To resolve this I created a custom "Applied Transaction Relationship Record" with fields for applied transaction, line number, applied to transaction, and whether it's been processed or not by the XML export script. The tricky part is, the line numbers seem to change periodically on the applying transaction. TL:DR; My question is - Is there a unique identifier for apply lines on bill credits and bill payments that I can use instead of line number?
I tried lineuniquekey but it doesn't seem to actually refer to apply lines because I get the same one for each line in any given transaction.
b
id imagine that the id of the transaction being applied is unique
k
yes that is, but what I'm actually trying to track is the relationship between each applied line in the applying transaction and its applied to transaction
and whether it's already been exported to XML or not
how can I match it up again on subsequent edits if the line number changes each time?
The credits are pretty straightforward as they tend to only have one or a few lines, but the payments are created from the "Pay Bills" screen and apply to dozens of bills
b
each bill on the apply sublist of the payment is unique
👍 1
💯 1
k
Aha!
so it cannot be listed twice?
good call
that should be only a minor rework of the logic. 🙂
Next question, is there an easy way to delete all of a custom record type's records?
b
delete the custom record type
k
Ew
I'd rather not lol
I'll just manually delete them. There's only 25 test records at the moment. Thanks!
@battk The unique relationship between any given applied to transaction and its related applying line was the answer, thank you!!!