does anyone know, when you do record.create({type:...
# suitescript
n
does anyone know, when you do record.create({type: record.Type.DEPOSIT, isDynamic: true, defaultValues: {account:data.account} }); if there's a way to filter the transactions listed out? I know you can specify the specific transactions you want to include if you know the internal id's up front but I don't. So I need to limit the list, maybe by date range or similar so there are not more than 10k results.
s
can you do a search first on the transactions (with whatever criteria you want) and then pass them to the initialize object when creating the deposit?
n
Yes, but, I already have a solution that is being use by a customer and it will be a very big re-write to achieve that. So I'm trying to resolve this with the least amount of coding. I didn't want to get in to specifics as it's a bit long winded to explain. It wouldn't be an issue but there has been a support case in with NS for about 6 weeks and now they have fixed a defect we find ourselves in a position where the deposit has over 10k records and matching is failing. I'm thinking I may have to knock up a dirty script to do as you describe just to get the number of un-deposited transactions down to a manageable number. 😞
@stalbert thanks for replying btw
s
I recently ran up against the 10k limit myself on deposits. Even that number (10k) worries me because it's way beyond anything I can find actually documented.
Have you tried digging up any info or suiteanswers around what initialize values are accepted on deposit creation? Maybe there's a way to specify a filter or something through that?
n
Yeah, annoyingly on the "Make Deposits" screen there's a bunch of filters you can employ but it's not accessible it seems via script. Seems pretty random which 10k it brings back when you do it through script too, I've tried outputting the list to see what is in there 😞
Truth be told I've not looked specifically for that in SuiteAnswers! Worth a punt , thanks for suggesting it.(akin to saying "have you tried switching it off and on again, right? 🙂 )
s
In my case, I knew which transactions needed to be deposited, it's just there was something like 100k of them.
(and I 'knew' which ones via a transaction search 🙂 )
still, it does make me a bit nervous creating any transactions with 10k lines in NS. not you?
n
oh heck yes
Ideally I'd know that the deposit could be matched to a couple hundred records and process those in batches to get the list down., just had a thought about it though...
Wonder if, through the UI I create a deposit that is filtered with just a selection of the records I'm interested in, deposit, say the first 10, and save it. Then load that same deposit record in script and match a couple hundred I'm interested in... Wonder if it would retain the same transactions if I loaded it via script.
less than ideal but to chunk down a few hundred in batches to get the list down so they can run BAU going forward.
s
I would be curious to hear how your deposit reloading goes - my suspicion is those filters are a UI-only thing, though maybe I'm wrong.
I haven't tried it but does NS preserve the filtering if you save then reload same deposit just in the UI?
n
good point, when I'm in their account tonight / tomorrow I'll have a look. 😉 and let you know !