Payments are `appliedto` an Invoice, so you need t...
# suitescript
e
Payments are
appliedto
an Invoice, so you need to use the
appliedtotransaction
join
n
@erictgrubaugh So, not sure I follow. I looked on the invoice record and there is no join for appliedtotransaction. How else can I get the payment info on an invoice?
e
It's not documented as a Join specifically; there are several filters and columns that start with
appliedtransaction
I think
n
I saw that but what I need is to get the payment id, link (potentially), and the amount. Any ideas?
e
You'll have to retrieve
appliedtotransaction
then look it up or load it from there if it's not available. Or try using
appliedtotransaction
as a normal Join just to see if it works
n
Okay I tried it as a join and not and got nothing. How would I do the look up/ load
e
add
appliedtotransaction
as a Column, which will give you the record ID
n
Okay I did that. Now when I get the results, should I use that same value appliedtotransaction?
this is what I have right now. record.getValue('appliedtotransaction')
e
right so that should give you the record's internal ID
which you can then use for either a
record.load()
or a
search.lookupFields()
or to build a long list of internal IDs for a second
search
n
ahh but shouldn't that getValue i added return something? I am getting nothing when I look on the frontend.
Figured it out. Had to search on this one applyingtransaction and I got the id of the payment. Also, applyinglinkamount got me the amount of the payment.