Hi, I'm new to SuiteQL so this may be a very basic...
# suiteql
a
Hi, I'm new to SuiteQL so this may be a very basic question! Is it possible to get the sql query that a given report in NetSuite uses? I would like to customize the query based off of the report instead of starting from scratch.
s
Highly doubt it
a
Oh well, figured at least I'll try!
m
You can from an analytics workbook
a
Thank you, will check it out.
@michoel I'm not finding that option there, can you please point out how I can find it?
m
Copy code
require(['N/query'], function(query) {
    const queryObj = query.load({
        id: 'custworkbookXXXX'
    });

    console.log(queryObj.toSuiteQL().query);
});
a
Thank you so much!