How can I limit a script to only run in the ui?
# suitescript
a
How can I limit a script to only run in the ui?
j
Copy code
if(runtime.executionContext != 'USERINTERFACE')
			return;
a
Thanks.
e
The easiest way is to choose User Interface on the context tab on the deployment record.
j
oh right….yeah you can do that too. I guess for me I have certain stuff that runs or doesn’t depending on context, but all in the same UE script
1
a
Thanks.
n
I would go with handling it in the code so I can add additional logic when needed to run on different context.
💯 1