Hello there! I wondering if is there a way to rea...
# suitescript
r
Hello there! I wondering if is there a way to read Script Notes as we read a record?
s
Not sure what you mean, do you mean you want a record.load on script execution notes?
r
I want to add the script execution logs on my application, to do this, I need to access an entity called “scriptnotes” but that’s not such record type for it. I was wondering if there is an alternative way to do it.
s
You can get the "scriptexecutionlog" via saved search
Copy code
var scriptexecutionlogSearchObj = search.create({
   type: "scriptexecutionlog",
   filters:
   [
      ["date","within","today"]
   ],
   columns:
   [
      search.createColumn({
         name: "view",
         sort: search.Sort.ASC,
         label: "View"
      }),
      search.createColumn({name: "title", label: "Title"}),
      search.createColumn({name: "type", label: "Type"}),
      search.createColumn({name: "date", label: "Date"}),
      search.createColumn({name: "time", label: "Time"}),
      search.createColumn({name: "user", label: "User"}),
      search.createColumn({name: "scripttype", label: "Script Type"}),
      search.createColumn({name: "detail", label: "Details"})
   ]
});
var searchResultCount = scriptexecutionlogSearchObj.runPaged().count;
log.debug("scriptexecutionlogSearchObj result count",searchResultCount);
scriptexecutionlogSearchObj.run().each(function(result){
   // .run().each has a limit of 4,000 results
   return true;
});
r
is this execution logs about a certain script quota?
s
Not sure what you mean by that
You can filter the saved search by whatever criteria you need
r
I mean this Execution Logs:
any script record screen has it
s
Yeah, that is what you're looking for then
r
That’s exactly what I need, I just need to figure out how to filter it by scripts now
heheheh, thank you so much!
otherwise, I could filter it by title too, adding script id there! thanks again!
s
No problem!
b
you should have access to the script via the script join