I'm writing a script that prevents timesheets from...
# suitescript
m
I'm writing a script that prevents timesheets from being edited, depending on a custom integer value I created in the subsidiary record. It seems to work fine when I'm logged through the Administrator Center and try to enter time as an employee. But when I try to go into the Employee Center and do that, I can't load the subsidiary value. Anyone know why?
a
if your script runs a search of subsidiary records (or does a lookup, which is the same thing as a search), employee center roles likely don't have permissions to run searches on subsidiaries. I'm assuming this is a client script, which executes as the current user, so it will be subject to employee center role restrictions. 2 ways around it are: store the information you need in a custom record and allow the employee center roles access to the custom record; or have the client script call a suitelet that can run as admin to do the search.
m
thanks Amy!