I guess NetSuite forgot to implement ES6 inside ru...
# suitescript
a
I guess NetSuite forgot to implement ES6 inside run().each... go figure...
s
that doesn't make any sense
what were you trying to do?
a
As far as I can tell nothing ES6 wise works inside run().each().
For example:
.some
or:
const test = [ 2, 3, 4];
const a = [ 1, ...test];
@stalbert ^^^
s
that would be bonkers - you're saying they are running some other engine (or at least configuration) when executing
each()
? And you're sure this is a SS2.1 script?
This is just more reason for me to stick with NFT lazysearch
b
in what context?
Copy code
require(["N/search"], function (search) {
  var count = 0;
  search
    .create({ type: "transaction" })
    .run()
    .each(function () {
      count++;
      let test = [2, 3, 4];
      let a = [1, ...test];
      log.debug(count, a);
      return count < 4000;
    });
  log.debug("count", count);
});
works in the debugger
a
@battk Client side I would not be surprise, I need to test it again but I'm pretty sure it was UserEvent or MR Script context.
b
Thats the 2.1 debugger
Suitescript debuggers end with a log telling points and time used