Just found the error... it was an off by one error...
# suitescript
m
Just found the error... it was an off by one error! I feel so ridiculous
s
I didn't follow the whole conversation, but off-by-one errors can often be avoided by avoiding hand written loops altogether.. Not sure if that was your issue.
m
@stalbert Yeah, they can be, and ideally I'd use that. However, in Netsuite's SS 1.0 you have to use loops if you want more than 4000 results. It's a limitation of their API. 😕
s
I use NFT and even in SS1.0 it handles arbitrarily sized results sets. It does the looping code under the covers so I don't have to write it repeatedly. Ultimately, somewhere there will be loops but I won't want that (and associated bugs) in my application layer code. Having that in the NFT library means it only had to be written and debugged once, then reused with confidence.
m
That would make sense. NFT does abstract that away. I'm glad something like that exists.