Here's a brain teaser: 2.0 script deployed as sch...
# suitescript
r
Here's a brain teaser: 2.0 script deployed as scheduledscript fails, but deployed as suitelet works. Script runs a quick search, then creates a purchase order. Super straightforward - minimal PO values set and only 1 line. Never had that one. Just returns unexpected error.
Copy code
{
   type: "error.SuiteScriptError",
   name: "UNEXPECTED_ERROR",
   message: null,
   stack: [
      "anonymous(N/serverRecordService)",
      "executeScript(/SuiteScripts/Habit5 Scripts/xxxxx.js:142)"
   ],
   cause: {
      type: "internal error",
      code: "UNEXPECTED_ERROR",
      details: null,
      userEvent: null,
      stackTrace: [
         "anonymous(N/serverRecordService)",
         "executeScript(/SuiteScripts/Habit5 Scripts/xxxxx.js:142)"
      ],
      notifyOff: false
   },
   id: "9f734ee9-fabe-4f1c-bd40-93a4ce8d8673-2d323032312e30382e3330",
   notifyOff: false,
   userFacing: false
}
t
What's the code at line 142?
👍 2