my advise is not to do this in a user event script...
# suitescript
b
my advise is not to do this in a user event script, use a map/reduce script or scheduled script
a
what's the difference
load and save during map and then load and save again during reduce?
b
your choice really
a
I mean how can I do that with map reduce
b
primarily a user event script affects load/save time everywhere
scheduled or map reduce scripts dont
a
even if it's after submit
b
after submit still affects save time, its not asnychronous.
a
how can I do that with map reduce
pass the data to a map reduce script
and then load and save during map and then load and save again during reduce?
s
script parameters
a
yeah I mean the load and save part
b
a map/reduce script consists of a search (usually of records) that you want the script to run on
thats the getInputData step
then there is a map and reduce step
a
that's correct the load and save part is important
b
you can do whatever you want during those steps
a
ah
you mean I can
do both load and save during the map step
s
map and reduce stages can use the N/record module, just like any other script, so they can load, edit, and save records
a
so I can't avoid 2 loads and 2 saves
b
not really a problem
s
based upon what you described with the third-party, likely not, unless you can work with the vendor on a custom solution to trigger this logic another way
b
it will make the script take longer, which is not terrible
a
many thanks