i don't suppose there's any kind of development RE...
# suitescript
k
i don't suppose there's any kind of development REPL where i can just write code in the context of my sandbox account and see what happens? 😅
e
There isn't, but you can log in to any page that supports suitescript (Edit mode of any record is usually a good default) and write code in the browser console
It's not perfect for testing server-side scripts, but it's great for troubleshooting searches, queries, most record manipulations
k
how do i get at the equivalent of N/search (suitescript 2.x)?
e
Yet another of my ancient videos:

https://www.youtube.com/watch?v=ZAN8clhKxIw

k
❤️
e
k
filterExpression didn't get the job done. it didn't fail, but it returned all records without filtering it seems like
so i guess i have to figure out if i have something wrong in my syntax or what
this'll help a great deal, thanks
e
Oh I guess I wrote it down too: https://stoic.software/articles/8-ss2-console/ 😂
👍 3
k
okay, this helped me narrow it down to the "columns" property in search.create 🙂
unclear what's wrong, i can't seem to make anything work, but at least i'm not flailing in the dark anymore
gonna go skim through the other videos you linked and maybe get some answers
t
Not sure if it helps, but suitescript debugger was my go to: Customisation>Scripting>Script Debugger Wonder if Eric has changed his mind since https://stoic.software/articles/suitescript-debugger/ hahah, but I do use it for a what i think a few useful reasons Debugging chunks of MR, debugging UEs, date formats, search criterias, suiteql, loading part of the script I've even used it to do test connectivity with sftp.. Or maybe even on demand as a NetSuite Administrator fix a couple of broken records that need retriggering (edit and save) This is the snippet, you can slap the code that needs debugging in the try and then just see...
Copy code
require(['N/record','N/runtime','N/search','N/format'], function(record,runtime,search,format) {
  try{

  } catch (e) {
    log.error("ERROR:", JSON.stringify({type: e.type,name: e.name,message: e.message,stack: e.stack,cause: JSON.stringify(e.cause),id: e.id}));
  }
});
k
i couldn't get the suitescript debugger to show my deployed script at all 😞
oh, this is for repl. yeah, perhaps, but chrome sure is more convenient
t
@Kris Reeves you need to be the actual script owner in the script record, and it needs to be in testing mode
k
i did deploy in testing mode, though i'm not fully sure how to identify who the script owner is. i personally deployed it using VS code and a token bound to my user
¯\_(ツ)_/¯
right now i have a painful workflow that gets the job done, which is enough for me to make some progress anyway
t
okok what i mean is this owner is john smith, you'll need to change it to yourself, and then it'll popup in the debugger
good luck mate!
🙏 1
k
¯\_(ツ)_/¯
oh, it didn't attach the screenshot
yeah, it says it's me. i got it working before, but thanks for spelling it out
i know what to try and accomplish now
🙌 1
e
> Wonder if Eric has changed his mind since https://stoic.software/articles/suitescript-debugger/ > hahah, but I do use it for a what i think a few useful reasons I have not changed my mind 😄 but that's more of a Me Problem, not a Debugger Problem
😂 1