I am getting following error ```{"type":"error.Sui...
# suitescript
v
I am getting following error
Copy code
{
  "type": "error.SuiteScriptError",
  "name": "USER_ERROR",
  "message": "You must enter at least one line item for this transaction.",
  "stack": [
    "anonymous(N/serverRecordService)",
    "_get(/SuiteScripts/GetItem.js:57)"
  ],
  "cause": {
    "type": "internal error",
    "code": "USER_ERROR",
    "details": "You must enter at least one line item for this transaction.",
    "userEvent": null,
    "stackTrace": [
      "anonymous(N/serverRecordService)",
      "_get(/SuiteScripts/GetItem.js:57)"
    ],
    "notifyOff": false
  },
  "id": "",
  "notifyOff": false,
  "userFacing": false
}
b
probably need to share code for this one
but your error is saying your transaction has no items
v
Untitled
Here is my code. I am calling the get method
b
dont set the subsidiary after you set the items
usually just set the body fields first
then set the line items
n
you also appear to be setting the line item twice...
v
Yes, I removed the line item twice
Anything else that can create an issue ?
b
did you set the body fields before the line fields?
v
No
n
body then lines
v
It's worked 🙂