I have a question. is it possible to create a res...
# suitescript
p
I have a question. is it possible to create a restlet that gets values from a saved search through the api? we only want that role to access and only get data from that restlet
b
you can make a restlet (or suitelet) that uses the N/search module.
That said, a restlet uses the same permission as the user accessing the restlet. a user with access to run the search in the restlet will have the same ability to run the search in the user interface
suitelets are the usual option for providing access using a different role since you can choose which role a suitelet runs as
p
@battk Thanks! Can you pass in criteria into the suitelet to have them filter for specific objects?
b
yes
p
so with the suitelet solution we would not have to give the role view access to invoices? they just need access to run the suitelet?
b
yes
p
I have one more question. would you recommend having a restlet call the suitelet through the rest api?
m
Is the restlet called from the outside or by logged in Netsuite users? If need external authorization you would use a restlet and you would provide credentials that have the role with the specified permissions. If it is for internal users and you want them all to get the same permissions when accessing the search then you would just create a suitelet and set the role you want on the suitelet. I don't see what the use case would be for calling a suitelet via the restlet if your end goal is to give everybody that accesses it the same permissions.
b
your question doesnt sound sane. There is no way to call a suitelet via the rest api. As Marvin mentioned, it is unusual to call a suitelet inside of a restlet. As far as i can tell, you dont know what a suitelet is, nor a restlet. Experiment with restlets and suitelets first so that you have some idea of what you are working with
p
our org wants to limit who has access to netsuite and we will only want them to have access to specific fields