Lorenzo
10/14/2024, 3:06 PMCeligo AI
10/14/2024, 3:06 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you're encountering an error due to an invalid value for the 'item' field in your request body. The error message suggests that the value '131' is not valid for the 'item' field. The format of your request body seems correct, but the values you're using might not be valid in your NetSuite account. The 'item' field usually expects an internal ID of an item record in NetSuite. Here's a sample format of a request body to create a sales order with line items:
json
{
"entity": {
"id": "143"
},
"item": {
"items": [
{
"item": {
"id": "131"
},
"quantity": 166.0,
"rate": 2.0
},
{
"item": {
"id": "132"
},
"quantity": 191.0,
"rate": 8.0
}
]
},
"tranDate": "2024-01-01"
}
In this example, '131' and '132' should be the internal IDs of the items you want to add to the sales order. You need to make sure these IDs are valid in your NetSuite account.
If you're still encountering issues, you might want to check the metadata of the 'salesOrder' record in the REST API Browser or the SuiteTalk Schema Browser to make sure you're using the correct field names and data types.
Also, please note that there are some limitations when using REST Web Services in NetSuite. For example, if SuiteTax is not enabled, you might not be able to use REST web services to add items.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/14/2024, 3:06 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.866517305
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851604164
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84988
Celigo AI
10/14/2024, 3:06 PMLorenzo
10/14/2024, 3:08 PM