Hello, is anyone aware of a way to update attribut...
# suitescript
j
Hello, is anyone aware of a way to update attributes on an existing saved search? My main goal is restricting saved searches access from a specific role. How I'm thinking I'll have to do that is setting public to false and then updating roles in the audience subtab but hopefully with some sort of automation because I have thousands of records to update. I don't see saved searches in imports / mass updates and I haven't been able to update anything using a script. Furthest I get with a script is when using: search.load Error: Error Unable to determine record type for saved search id 3332 I have also tried to restrict saved searches before they load but it doesn't seem like saved searches work same as other records. Thank you!
a
Do you just want to remove access to ALL saved searches for a specific role? you can do that at the role level Edit the role and under the Lists tab there's a "Perform Search" permission, just remove that and save the role.
similarly if you want to remove access to a specific record type there's probably a permission for that too.
and to your scripting point, I don't think you can edit saved searches with script, that said I've never tried so maybe you can? I just don't think this is the right approach though this is a roles/permission/administration problem that shouldn't need a scripting solution
I don't think you'd want to use search module to edit saved searches, you'd have to load them as a record and use the record module, and I'd guess searches simply aren't available via the record modules. Again, this is just speculation on my part.
m
I've done something similar via a browser automation tool (puppeteer).
j
@Anthony OConnor I do want this specific role to have access to saved searches but only a few select ones. The easiest way I see to do that is by adding the role to the audience, I wish there was a similar tab to audience but it worked the opposite way where it restricted from the user/role/department if selected. Yeah I tried loading them as records, no luck. @michoel I will check that out! Thanks for your help guys!
👍 1
btw, NetSuite replied to my ticket related to this stating it's logged as an enhancement. So there is no current native solution unfortunately.
😞 1