Hi, I am trying to create a Customer with the endpoint - POST
https://xxxxxx.suitetalk.api.netsuite.com/services/rest/record/v1/customer/
I am trying with this payload:
{ "entityid": "123452", "companyname": "Intact Test 2", "subsidiary": { "id": "3" }, "contactRoles": { "items": [ {
"contact": { "id": "5986", "refName": "Intact Contact" }, "contactName": "Intact Contact", "email": "test@intact .com", "giveAccess": false, "role": { "id": "14", "refName": "Customer Center" } } ] }}
I get this error:
"detail": "Error while accessing a resource. 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.", "o:errorPath": "contactRoles", "o:errorCode": "USER_ERROR"
Contact 5986 exists already. I also tried with the "id" to create a new contact, but no luck.
I also tried the complete payload from a GET example. Same error, I also tried including some field and excluding some and no luck.
The problem is I need to add "contactRoles" - otherwise I get this error: Error while accessing a resource. You must enter at least one line for sublist: Contacts.
I can normally create a Customer through the webpage.