Can anyone help me with permission issue of runnin...
# suiteql
s
Can anyone help me with permission issue of running suiteql on system notes table? I have the permission to run suiteql queries but I am not getting any results. This is the query.
Copy code
SELECT  
    TO_CHAR(Date, 'YYYY-MM-DD HH24:MI:SS TZH:TZM') AS DateTimeWithTZ,
    RecordTypeID,  
    BUILTIN.DF( RecordTypeID ) AS RecordType,  
    RecordID,  
    Field,  
    OldValue,  
    NewValue,  
    Name AS EmployeeID,  
    BUILTIN.DF( Name ) AS EmployeeName,  
    Role,  
    BUILTIN.DF( Role ) AS RoleName,  
    Context,  
    BUILTIN.DF( Context ) AS ContextName 
FROM  
    SystemNote
WHERE  
    Date BETWEEN To_Date ( '2024-01-01', 'YYYY-MM-DD' ) AND To_Date ( '2024-09-31', 'YYYY-MM-DD' )
ORDER BY  
    Date DESC
And this is the response.
Copy code
{
  "links": {
    "self": "<https://XXXXXXX.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=100&offset=0>",
    "next": null,
    "last": null
  },
  "count": 0,
  "hasMore": false,
  "items": [],
  "offset": 0,
  "totalResults": 0
}
I know the data is there but somehow I am not getting any response.
m
Funny thing about SuiteQL and System Notes. If you're not using the Administrator role or a role with the "Core Administration Permissions" box checked, you can only see your own system notes in the results. When you connect via REST API, are you using a role that might not have those permissions and might not be doing anything to create system notes?
s
@Mike Robbins Thanks for the response. I can confirm that issue with no result was in fact due to querying only my own system notes. I do have my role with "Core Administration Permissions" checked. Is there anything else I should check to have a permission to query all system notes?
m
As far as I know, you need the Lists > Notes Tab > Full permission and the "Core Administratrion Permission" box checked. Right before I posted my last message, I verified by querying distinct name from systemnote before and after unchecking that box.
s
I was able to troubleshoot and fix the issue. Thanks @Mike Robbins for your help!