Is there a way to execute code within a Module as ...
# suitescript
j
Is there a way to execute code within a Module as a certain role, separate from running the deployment that calls that code under that role? I have a fn in a module that requires a higher permission to run, but I don’t want to grant that higher permission to the entire UserEvent script.
d
No. Not specifically. You could look if the current user has those permissions that are needed to complete the module script.
s
or encapsulate that module in a suitelet that can run with elevated permissions.
👎 2
👍 1
b
i would not expect a user event script making a call to an internal suitelet to be simple
nor would i expect using the external url instead to be safe