Any of the documentation navigators / specialists ...
# suitescript
a
Any of the documentation navigators / specialists knows if there is documented behavior of the different audience options for UserEvent Scripts? Meaning: • All Roles - Checkbox checked • All Users - Checkbox checked • Some Subsidiaries selected? In my experience the Audience tab is not working as I think it should work, meaning: Some users or roles with access to unselected Subsidiaries still trigger the UE script. Is this expected behavior?
e
I think subsidiaries is to allow additional users aside from those listed under roles
actually, that is users, not subsidiaries. wrong! hmm
Users/Employees are in addition to the others, not in combination with the others. In other words, if you select a user - then even if they are NOT in the Subsidiaries selected, the script will execute for them I believe
a
Then you must select All Roles, uncheck All Users and Select some subsidiaries and that will do what I need?
🤷‍♂️ 1
e
Copy code
If you choose both role and department options on the Audience subtab, a user must belong to one of the selected roles AND one of the selected departments to execute the script. If you choose options for any other combinations of types (groups, employees, and partners), a user need only belong to a selected option of one type OR of another.
https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_N2999041.html
it’s funny, bec I don’t think the help doc addresses Subsidiaries and selected users, but I think that if you removed Users yes, it would behave as you are expecting it to
a
Yep is down … thank you so much for the link tho…
It does not explain Subsidiary combination with the rest of the options tho.
👀 1
e
NetSuite Applications Suite - Defining Script Audience.pdf
a
Yep, no Subsidiary with All Roles or All User combination documented. I also suspect that there will be a bigger problem, it would all relied on the user or Role Subsidiary and not necessarily the record to which the script is deployed Subsidiary which brings other problems to the table. • Sales Order in Subsidiary A. • User with access to Subsidiary A and B or with Role 1 with access to Subsidiary A and Role 2 with access to Subsidiary B. • The script will be trigger on Subsidiary A event tho Subsidiary A is unselected in the Subsidiary List. Again, maybe this is working in the way it was designed but I don’t feel it make much sense, script deployments are about the script and the record they are deployed to, therefore the subsidiary of the record should be considered or at least be an option for the execution context/audience.
e
This is true and always a challenge.
Essentially, the script has to be aware of the context/role/subsidiary on which or in which it is executing and then decide on whether or not to take action