Hi all is there any way to remove all line items a...
# suitescript
c
Hi all is there any way to remove all line items at once instead of using record/currrent record removeline item method one by one. In client script removing each line item taking 1sec. Any suggestions please?
c
Thaks @stalbert but this is third party one which need to install as a package. And moreover internally they are looping and doing the same, so i think this will have same performance issue. If native method available that will be really helpful.
s
Yes well, if there were a native method then NFT wouldn't need one :)
c
Ok thank you understood 😊 so there is no such native method.
We found there are some apis internally to remove all line items like clear_split('sublist'). Is it fine to use such methods
s
I presume by 'internal api' you mean client side JS code. I avoid using any such APIs as they can change at any time or perhaps have unintended consequences. However, if you're willing to take that chance it can be a workaround.
c
Thanks again @stalbert
s
best of luck!
m
I think the way to speak this up is to set
ignoreRecalc
as true (and maybe false for the last line)