Get roles and permissions in a SuiteQL Query
# ask-stanley-ai
d
Get roles and permissions in a SuiteQL Query
c
AI generated answer (using internal Slack threads):
To get roles and permissions in a SuiteQL query, you can use the
rolepermissions
analytics data source. However, it's important to note that this may not list all permissions for a given role. For example, an admin role may not list all permissions, as some permissions may be inherent to the role or not explicitly listed. Here is a sample query:
Copy code
sql
SELECT * FROM rolepermissions where role='3'
This query will return a list of all the permissions assigned to the role with ID '3'. However, it's important to note that SuiteQL is read-only, meaning you cannot use it to create or modify roles or permissions. If you need to create or modify roles or permissions programmatically, you would need to use SuiteScript, not SuiteQL. For running a SuiteQL query via the REST API, you need to have the 'SuiteAnalytics Workbook' permission under Reports. To restrict access to a Suitelet to certain roles, you can specify the roles on the script deployment. SuiteQL itself is read-only, so it cannot be used to add or update data in NetSuite. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840850949
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828003049
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825378478
Please provide your feedback on this answer.