I'm not having any issues with `create()`, `run()`...
# suitescript
e
I'm not having any issues with
create()
,
run()
, or
each()
in the console on a Saved Search Search
r
Good tip to run 2.0 scripts in the console. only done this for 1.0. Maybe you could do a video on this 😉
@erictgrubaugh when I use
var s = require("N/search");
on the console in edit mode I get the following error
bootstrap.js?NS_VER=2018.2.0&minver=110:194 Uncaught Error: Module name "N/search" has not been loaded yet for context: _. Use require([])
is there something else I need to do to get it to work?
e
@Seer Yep
Whoops @reza.seedin Yes, you need to first do
require(["N/search"])
I'm not exactly sure why
but typically a console session will look something like
Copy code
require(["N/search"]);

var s = require("N/search");

s.create(...).run().each(...);

require(["N/record"]);

var r = require("N/record");

r.submitFields(...);
r
Ahh thanks.. for that
👍🏼 1