Question around 'Execute as Role' = 'Administrato...
# suitescript
d
Question around 'Execute as Role' = 'Administrator`. This doesn't affect the search result produce within the script, correct? Meaning, the search results will still adhere to the User/Role that trigger the script.?
n
No it will execute the search as if the user role is admin
execute as admin is used to bypass role restrictions. Saved searches would be included in that.
d
Interesting. We're not seeing that behaviour. I've started by setting ALL scripts to Execute as Admin, yet, the User/Role that triggers the scripts get script errors indicating that do not have certain permissions
e
You can't run all scripts as admin. Client scripts always run as the current user AFAIK.
a
just speculating - I'd think the PERMISSIONS for the searches would use admin, but if you're using relative filters in the search based on employee - like "my team" or "mine" or w/e then I'd guess that would still be respected because that's not a user permission as such.
🤯 1
👍 1
e
The searches are being dynamically created and executed at the code level.