Hi guys! Is there any way to create a valid .zip f...
# suitescript
h
Hi guys! Is there any way to create a valid .zip file in Netsuite? I'm creating an XML file and rendering a PDF and would need to zip them. I tried with JSzip but no success there so would appreciate a valid example on how to do it.
b
id also love to know what stopped you for jszip
h
Thanks @battk! Now I'm just really ashamed that I was not aware of N/compress! What goes for JSZip, all I got was timeout error when trying to create a zip, but I might have done something wrong with that.
That N/compress worked like a charm!
b
in general my experience with binary operation in netsuite has been that they are high risk for slow performance/execution limits
h
I agree with you @battk. Too often I ran into execution limits problems with xml-files, especially with integrations
b
you are doing weird stuff with xml if they are binary
h
It's not binary, just really long xml-files. Trying to read them into Netsuite, and save them into custom record. Mapreduce can't restart itself because there's not saved search attached, just one really big ass xml-file.
Workaround is to convert xml to csv and then push data to netsuite. Then no script execution limits occur.