I'm creating a "Deposit" record in script and woul...
# suitescript
n
I'm creating a "Deposit" record in script and would like to filter the transactions on the sublist based on the transaction from / to date. Does anyone know if this is possible?
you are probably better off using default values to choose which transactions to deposit against
n
I have a CSV with let's say 20 rows. I need to match those rows against transactions on the deposit. Currently I am unable because the first 10k results on deposit do not include the rows I'm interested in. I'd like to be able to filter so that the rows on the deposit I'm interested in are available via script. Via the UI I am able to filter, for example on transaction from / to date. This does not seem to be an option when scripting. I see it's possible to disable filtering but not to access the filters themselves. NS Support agree it's not possible, it's being logged as a possible "enhancement" 😞
b
do a search for undeposited transactions (and whatever other filters)
use the matching transactions for the deposits default values
n
Thanks for your replies. I'll admit I'm not sure that's how it works or if I'm missing something. the approach is a) record.create... "deposit" b) loop through matching a pre-determined list of transactions to that of the payments sublist. The payments sublist contains upto 10k records. I have no control of that list besides setting the bank account and a couple other main fields. Are you suggesting that I add a sublist line one per transaction rather than matching against the sublist?
b
there is a deposits default initialization value to prepopulate which transaction to apply to deposit to
the deposits should automatically be marked, even if they are not among the first 10000
n
ah do you mean: var myDeposit = record.create({ type: record.Type.DEPOSIT, defaultValues: { 'deposits': '818,819' } });
with deposits being the ID's of the transactions to be desposited?
b
it might have to be an array, but yes
n
Do you happen to know, if the transactions, say a cash sale has already been deposited if that would cause the file to fail when you saved it? I'm keen to avoid this hence the line level matching.
I'm also performing line level matching based on string values since I do not have the transaction internal id on the CSV being uploaded. I could turn it on it's head though and search for the transactions based on that string though.. probbaly!
b
dont know, ive never tried to deposit against an already deposited transaction
thats kind of the point of doing the search for undeposited transactions in the first place
n
Yeah, I hear you on that, thanks very much for your help. I'll give it a whirl 🙂
189 Views