Any idea why this fails? As you can see from the u...
# suitescript
r
Copy code
{
  "type": "error.SuiteScriptError",
  "name": "INVALID_TRANS_TYP",
  "message": "Transaction type specified is incorrect.",
  "stack": [
    "createError(N/error)",
    "onRequest(/SuiteScripts/Expense/Suitelet/[MJA]expenseCleanup.js:25)"
  ],
  "cause": {
    "type": "internal error",
    "code": "INVALID_TRANS_TYP",
    "details": "Transaction type specified is incorrect.",
    "userEvent": null,
    "stackTrace": [
      "createError(N/error)",
      "onRequest(/SuiteScripts/Expense/Suitelet/[MJA]expenseCleanup.js:25)"
    ],
    "notifyOff": false
  },
  "id": "",
  "notifyOff": false,
  "userFacing": false
}
h
@reptar I am not sure if it's possible, did you try loading in Dynamic mode ?
r
Same error.
the type enum matches the documentation as well.. 😕
h
is there a way to replace enum type with value ?
r
I've definitely seen it done, but I can't find it in the doc. I'll just guess... 👍
Recently I noticed there was no enum for 'entitygroup'. Cool
h
docs show only names
b
if you want to see its value, just log record.Type.EXPENSE_REPORT
👍 1
its value should be expensereport
h
"type": "expensereport",
that's what I did, I mean I used chrome extension
n
You could also have navigated to the NS Record browser to find out the "raw" record type value.