jen
12/13/2023, 11:56 PMtask.create()
. I want the system to check the role of the user that triggered the call, and use that role in the code that executes within the Scheduled Script.jen
12/13/2023, 11:58 PMuser
as such to run the script under, so I want to be able to do my own lookup to determine the appropriate role, then somehow say “run this task.create() with role A”jen
12/13/2023, 11:58 PMAnthony OConnor
12/14/2023, 12:19 AMjen
12/14/2023, 12:29 AMjen
12/14/2023, 12:29 AMjen
12/14/2023, 12:29 AMmichoel
12/14/2023, 12:30 AMjen
12/14/2023, 12:31 AMjen
12/14/2023, 12:31 AMjen
12/14/2023, 12:31 AMAnthony OConnor
12/14/2023, 12:31 AMAnthony OConnor
12/14/2023, 12:31 AMjen
12/14/2023, 12:32 AMjen
12/14/2023, 12:32 AMAnthony OConnor
12/14/2023, 12:32 AMjen
12/14/2023, 12:33 AMSELECT DISTINCT name
FROM rolepermissions
JOIN employeeroles ON employeeroles.selectedrole = rolepermissions.role
WHERE employeeroles.entity =
+ ns_user_id + ` AND permlevel > 0
ORDER BY name`;jen
12/14/2023, 12:33 AMjen
12/14/2023, 12:34 AMAnthony OConnor
12/14/2023, 12:34 AMAnthony OConnor
12/14/2023, 12:35 AMAnthony OConnor
12/14/2023, 12:36 AMjen
12/14/2023, 12:38 AMjen
12/14/2023, 12:38 AMjen
12/14/2023, 12:38 AMAnthony OConnor
12/14/2023, 12:39 AMjen
12/14/2023, 12:39 AMAnthony OConnor
12/14/2023, 12:41 AMAnthony OConnor
12/14/2023, 12:41 AMalien4u
12/14/2023, 2:54 PMtask
, you are going to have a limited number of roles, therefore you can do something like:
• Search for an existing deployment for the user role, if exists then create your task with that deployment, otherwise, create the deployment.
• At some point you end up with the deployments you need per role and no more deployments are created.rustyshackles
12/14/2023, 10:04 PMruntime
module in the scheduled script? To my knowledge, if the suitelet is triggered in the UI and it calls a MR or Sched script, the system passes the user info.jen
12/14/2023, 10:20 PMjen
12/14/2023, 10:20 PM