<@UJ4LB5KU4> you can just use the context filterin...
# suitescript
n
@ericbirdsall you can just use the context filtering in the deployment record. Or you can use the
runtime
module
runtime.executionContext === runtime.ContextType.SUITELET
e
@nzaleski Do you feel there is an advantage to use context filtering in the deployment over using the runtime module? I generally like to be able to look at a .js file and know exactly what its triggers are, which is why I would normally go for the runtime option. but wondering if you feel differently
n
I think they are about the same. One situation where I think it's better to have in the context filtering is when you have multiple different contexts you want to allow. So I would rather have this in my objects`<executioncontext>RESTLET|SUITELET|USERINTERFACE</executioncontext>` then
if (runtime.executionContext === runtime.ContextType.SUITELET || runtime.ContextType.RESTLET || runtime.ContextType.USER_INTERFACE)
so I just always use the context filtering now just to keep it one way
e
appreciate your view on that
n
no problem