Is there a way, from a Map/Reduce script, to save ...
# suitescript
s
Is there a way, from a Map/Reduce script, to save a record without triggering additional user event scripts? We have a scenario where we only want to run 1 script after a csv import to speed up an operation. We have probably 20 scripts running on it that I inherited when I started working at my new company. Long term solution will be to go through those 20 scripts.
k
I've pondered this before but without adding the ignoring the MR context in those scripts i have not found any other way
b
you can cheat and use the disableTriggers default value
s
how do you set that?
k
what?!?!
I assumed that wasn;t in ss2.0 and only in 1.0
s
ditto
b
its not very consistent
but you can use the disabletriggers as a default value while creating the record to disable before load entry points
and you can use the disableTriggers option while saving the record to disable before submit and after submit entry points
i might have gotten the casing wrong, so you may want to switch the disabletriggers with disableTriggers
s
I don't see disableTriggers on record.Save() in the help docs though? Am I missing something?
b
its why its cheating
s
haha
b
i would only use it as a temporary solution
s
man. Wish they'd add this back
Is there a way to just trigger a specific user event script? So in a map reduce, somehow trigger just that script?
b
you are probably better off just modifying all the script deployments so that their audience doesnt include your map/reduce script
s
am I able to change it so it only excludes that 1 specific map/reduce?
b
hopefully you are lucky enough to be able to just exclude it in the context types
s
Unfortunately it's going to need to run on all other map/reduce. Just not this one.
b
meh, nothing that wouldnt be safer than fixing the other user events in your account
netsuite 1