Morning, I’m trying `query.load({ id: 'myquery' })...
# suitescript
c
Morning, I’m trying
query.load({ id: 'myquery' });
and coming back with
SSS_RECORD_NOT_FOUND
. The id I’m using is from the SuiteAnalytics UI. I’ve tried an existing system generated workbook ids and those work. I’ve also shared my workbook with all roles. Is there something I’m missing here?
So I’m not sure what’s up here but it seems like a bug. I went ahead and started writing my own queries and it looks like that’ll be faster anyway. The syntax is a bit harder to learn that way but more efficient after cresting the learning curve.
j
There is a chrome plug-in to convert your saved searches
c
I’ve used that, very handy tool.
j
I think there is one for the analytics workbooks too.
NetSuite: Workbook to SuiteQL
c
wow, didn’t know that… awesome! Thanks!!
Got a link? I can’t find it in the chrome store… 😞
j
it may not work anymore. I wasn't finding it in the store either.
c
The only reference I can find seems to be in Mandarin
j
Very strange. The extension I have installed does still seem to work.
s
it's sending all your search data to china?
😯 2
m
That extension would just hang for me when it was still up. I just use this in the browser console and it works great
Copy code
require(['N/query'], function(query) {
    const sql = query.load({ id: 'custworkbookX' }).toSuiteQL().query;
    console.log(sql);
});
💯 1
s
that solutions looks far less likely to send sensitive company data to China.
👏🏻 1
🤣 2