Does anyone know how to get to the equivalent of t...
# suiteql
k
Does anyone know how to get to the equivalent of the
applyingtransactions
record in SuiteQL? I’m trying to query vendor bills which were
paid only with vendor credits.
@James Pak Have you dived into this? I think I’m looking at one of your older scripts right now.
@mattdahse Could use your help on this one buddy.
@tdietrich You’re the SuiteQL guru, for me anyhow.
j
oh boy. it's been a while since I've done anything like this
k
Copy code
// this filter is functionally equivalent to Bills being paid only via Bill Credits
['min(formulatext: ns_concat({applyingtransaction.type}))', search.Operator.DOESNOTCONTAIN, 'Payment']
Does this look familiar?
j
I think Zack might have done something with the NextTransactionLink or NextTransactionLineLink table but I need to play around with it a bit
k
Sean sent me something about
NextTransactionLineLink
, is that the table I’m looking for?
j
probably. I'm checking it out
data looks something like this:
k
Same
j
Copy code
select * from previoustransactionlink where previousdoc in ('887617');
this gave me something useful
the parameter was the ID of the bill
I didn't really test this very thoroughly so your mileage may vary
to filter bills such that you only get those that were paid with vendor credits, you would obviously get the complete set of bills and remove those without payments and those with non-credit applications
👍 1
k
Thanks!
t
@Kevin Hoelzel Yeah, I think the PreviousTransactionLineLink and NextTransactionLineLink tables are what you're looking for. This might help a bit: https://timdietrich.me/blog/netsuite-suiteql-related-transactions/
👍 2