i am trying to use nQuery to return a list of cust...
# suitescript
s
i am trying to use nQuery to return a list of customers from my script and i keep getting a permissions issue for my role. is there a special permission a role needs to use query?
s
Hey battk, I have that checked already
i also have perform search permission
b
what error are you getting with what code
s
YOUR_CURRENT_ROLE_DOES_NOT_HAVE_PERMISSION_TO_PERFORM_THIS_ACTION
if I do a search on items it returns the items. if I do a query on items, I get that error
b
what code
s
copied and pasted what was in the N/query help docs
b
what are the reports permissions for the role?
s
only income
b
read the docs harder
Copy code
To provide SuiteAnalytics Workbook access to users assigned to a custom role, add the SuiteAnalytics Workbook permission to the role and set the access level to Edit on the Reports subtab of the Permissions tab.
s
I read that 5 times and somehow missed that. Thanks!
so i'm working on a query. I'm searching for all items, and wanting to filter on inventory location where subsidiary = 2. Is this something a query can do?
b
you are doing a lot of work for something you can use 2 searches for
s
was hoping that I could just do one search. Currently i'm going to have to do a search for the itme, and then for the locations
which it's simple, so yeah, you're probably right. just wasn't sure if I would be able to make one query and filter on memberitem.location.subsidiary = 2
b
same rules for search apply
make the query in the ui
then convert it to code
s
i'm quite new to queries, but where do you make a query via ui?
s
well that's a lot more complicated lol
more complicated than a search*
how do I convert it to code? chrome extension?
b
trial/error after reading all of the N/query documentation
alternatively load the query in suitescript and explore how it looks like