G
10/27/2023, 8:01 PM'[
{
"salesOrderExternalId": "082372348",
"status": "C",
"salesOrderId": "2342347",
"linesToFulfill": [
{
"line": 1,
"quantity": 1
},
{
"line": 2,
"quantity": 1
},
]
},
{
"salesOrderExternalId": "123123123",
"status": "C",
"salesOrderId": "42334",
"linesToFulfill": [
{
"line": 1,
"quantity": 3
},
"line": 16,
"quantity": 1
},
]
}
]'
This below script works if I exclude line 16 from the array but I need it work for this, I've checked the line from the sales order and it is one that can fulfil so not sure what the issue is:
{
"line": 16,
"quantity": 1
},
battk
10/27/2023, 8:06 PMG
10/27/2023, 8:40 PM{"type":"error.SuiteScriptError","name":"SSS_INVALID_SUBLIST_OPERATION","message":"You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.","id":"","stack":["anonymous(N/serverRecordService)","doPost(/SuiteScripts/ABC.js:67)"],"cause":{"type":"internal error","code":"SSS_INVALID_SUBLIST_OPERATION","details":"You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.","userEvent":null,"stackTrace":["anonymous(N/serverRecordService)","doPost(/SuiteScripts/ABC.js:67)"],"notifyOff":false},"notifyOff":false,"userFacing":false}
battk
10/27/2023, 8:43 PMbattk
10/27/2023, 8:44 PMbattk
10/27/2023, 8:45 PMbattk
10/27/2023, 8:46 PMG
10/27/2023, 9:00 PMbattk
10/27/2023, 9:06 PMbattk
10/27/2023, 9:06 PMbattk
10/27/2023, 9:07 PMbattk
10/27/2023, 9:07 PMbattk
10/27/2023, 9:10 PMbattk
10/27/2023, 9:10 PM