Hello, I am trying to restrict a certain role to s...
# general
n
Hello, I am trying to restrict a certain role to seeing a subset of lines on sales orders. Class has not panned out so far and am wondering how the searches subtab works on roles. Is anyone able to enlighten me on how this is supposed to be used? Struggling to find documentation for this feature.
k
It looks custom to me. I don't see anything in the documentation about it.
n
Today is the first time I've heard of it, and it was from this post on reddit: https://www.reddit.com/r/Netsuite/comments/hdspte/item_visibility_by_role/ figured it was worth checking out. trying to mess around with it in sandbox to see what it might do
k
Ok it's native, I spoke too soon
weird that there's no documentation though!
n
unfortunately lack of documentation seems to be a commonality with oracle
Found it!
n
🙏
k
It didn't come up when I searched for "searches subtab". I had to click the "help" button when editing a role to find it.
n
awesome, thank you for digging that up
k
np
n
seemed like the sublist view was the only one that could've been a possibility, however it doesn't seem able to effect the sales order item list. Considering we also couldn't get class to work, is scripting basically the only option left to restrict certain SO lines from being visible to certain roles?
k
I don't think it's possible to change the visibility. I could be wrong though.
n
had seen an nlapidisablefield something function that can disable a field, but not necessarily a line. really what we want are people at one location to not be able to mess with lines on a sales order to be fulfilled at another location. If we use user location as the filter it goes by main line location, so either they see all or none. The other problem is both locations are under the same subsidiary. Pretty much grasping for straws at this point
k
You can do fields, especially at the header level. Sublist fields are trickier but possible. Sublist rows are not as easily scripted.
You could do a custom record I suppose, that simulates / controls a matching sales order, but that seems like over-engineering.
n
interesting thought, but i'd agree that it's over doing it.
k
Copy code
people at one location to not be able to mess with lines on a sales order to be fulfilled at another location
This part is 100% doable
validateLine return false
Use an if user location is not item location return false
it won't let them edit the line
n
makes sense, could probably leverage that on the IF as well so they can't also fulfill those either
k
For that I'd use a beforeSubmit in a user event script rather than validateLine
because the fulfillment happens on the back end
or maybe onSave
either way it's the same idea
n
appreciate the help
k
np
n
the other thing we are going to test for goofs and gaffs is if we remove location from the mainline but have a user location filter if it utilizes line location instead - but that's a shot in the dark