Netsuite - Can't create or update Purchase Order Line Items - Error "Please enter value(s) for: Vendor"

I'm running into an issue where creating a Purchase Order via a NetSuite import works only for the first time and it creates only one of the line items but any subsequent Update to add more line items to that same PO fails with:

{"code":"USER_ERROR","message":"Please enter value(s) for: Vendor"}

even though the Vendor field is correctly mapped, present and resolved in the payload, and already saved correctly on the existing record (confirmed in the NetSuite UI).

I can't understand why, I tried almost everything mentioned online and nothing works.

Sample Payload:
{
"page_of_records": [
{
"record": {
"attributes": {
"type": "Purchase_Order__c",
"url": "/services/data/v61.0/sobjects/Purchase_Order__c/a0rbV00001WrumrQAB"
},
"Id": "a0rbV00001WrumrQAB",
"Name": "PO-000001695",
"Assigned_Vendor__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v61.0/sobjects/Account/001bV0000100OrFQAU"
},
"NetsuiteVendorID__c": "1297",
"serviceTerritory__c": "0HhbV0000001z33SAA",
"Id": "001bV0000100OrFQAU"
},
"Order_Date__c": null,
"CreatedDate": "2026-07-14T16:08:56.000+0000",
"PO_Type__c": "Labor",
"Status__c": "Accepted",
"Purchase_Order_Line_Items__r": [
{
"attributes": {
"type": "Purchase_Order_Line_Item__c",
"url": "/services/data/v61.0/sobjects/Purchase_Order_Line_Item__c/a0qbV00000nkFC5QAM"
},
"Id": "a0qbV00000nkFC5QAM",
"Product__r": {
"attributes": {
"type": "Product2",
"url": "/services/data/v61.0/sobjects/Product2/01tbV00000fFA4zQAG"
},
"NetsuiteItemID__c": "7360"
},
"Quantity__c": 4,
"UnitCost__c": 41.667,
"Item_Description__c": "Base install labor (Walkable) Labor Waste Factor -Good Shingles (# Squares of Waste)"
},
{
"attributes": {
"type": "Purchase_Order_Line_Item__c",
"url": "/services/data/v61.0/sobjects/Purchase_Order_Line_Item__c/a0qbV00000nkFC6QAM"
},
"Id": "a0qbV00000nkFC6QAM",
"Product__r": {
"attributes": {
"type": "Product2",
"url": "/services/data/v61.0/sobjects/Product2/01tbV00000fFA4zQAG"
},
"NetsuiteItemID__c": "7360"
},
"Quantity__c": 15,
"UnitCost__c": 45,
"Item_Description__c": "Base install labor (Walkable) Labor Pitch 3/12 (# Squares)"
},
{
"attributes": {
"type": "Purchase_Order_Line_Item__c",
"url": "/services/data/v61.0/sobjects/Purchase_Order_Line_Item__c/a0qbV00000nkFC7QAM"
},
"Id": "a0qbV00000nkFC7QAM",
"Product__r": {
"attributes": {
"type": "Product2",
"url": "/services/data/v61.0/sobjects/Product2/01tbV00000fFA5UQAW"
},
"NetsuiteItemID__c": "7301"
},
"Quantity__c": 15,
"UnitCost__c": 45,
"Item_Description__c": "Regular 1-layer tear-off (Walkable) Labor Pitch 3/12 (# Squares)"
},
{
"attributes": {
"type": "Purchase_Order_Line_Item__c",
"url": "/services/data/v61.0/sobjects/Purchase_Order_Line_Item__c/a0qbV00000nkFC8QAM"
},
"Id": "a0qbV00000nkFC8QAM",
"Product__r": {
"attributes": {
"type": "Product2",
"url": "/services/data/v61.0/sobjects/Product2/01tbV00000fFA4aQAG"
},
"NetsuiteItemID__c": "7403"
},
"Quantity__c": 30,
"UnitCost__c": 2,
"Item_Description__c": "Ridge vent install (non-walk) Labor Ridges - Good/Better (# Linear Feet)"
}
]
}
}
]
}

One to Many is for when you want to create multiple records in your target system for one source record, for example when you want to create 4 inventory items for your 1 po. For Netsuite a PO is just one record.

Whats happening now is that the integration will create/update a new PO in NetSuite for each SalesForce Po line, search on the externalid, find the one it just created, and replace the line already on it and replace it with the new line.

Turn that setting off, and then redo your mapping to remove the _parent references and add Purchase_Order_Line_Items__r[*] for each item line field, and it should work.

Hey Bas!

Thanks for the advice, however after doing this I'm still facing the same missing Vendor issue. The request now has multiple lines but for some reason it refuses to update lines. This is an extract of the new request I get:

See that the entity is correctly mapped at the beginning.

importing record {"index":0,"retryCount":0}
{"nlobjRecordType":"purchaseorder","nlobjFieldIds":{"externalid":"a0rbV00001WrumrQAB","entity":1297,"trandate":"2026-07-14T16:08:56.000+0000","subsidiary":4,"location":12,"memo":"","internalid":10320},"nlobjSublistIds":{"item":[{"item":7360,"quantity":4,"rate":41.667,"description":"Base install labor (Walkable) Labor Waste Factor -Good Shingles (# Squares of Waste)","line":"a0qbV00000nkFC5QAM","_keys":["line"]},{"item":7360,"quantity":15,"rate":45,"description":"Base install labor (Walkable) Labor Pitch 3/12 (# Squares)","line":"a0qbV00000nkFC6QAM","_keys":["line"]},{"item":7301,"quantity":15,"rate":45,"description":"Regular 1-layer tear-off (Walkable) Labor Pitch 3/12 (# Squares)","line":"a0qbV00000nkFC7QAM","_keys":["line"]},{"item":7403,"quantity":30,"rate":2,"description":"Ridge vent install (non-walk) Labor Ridges - Good/Better (# Linear Feet)","line":"a0qbV00000nkFC8QAM","_keys":["line"]}]}}
nlapi calls registered for $R:
r = NRecord.load({"type":"purchaseorder","id":10320,"defaultValues":{}});
r.setValue({"fieldId":"externalid","value":"a0rbV00001WrumrQAB"});
r.setValue({"fieldId":"trandate","value":"7/14/2026"});
r.setValue({"fieldId":"subsidiary","value":4});
r.setValue({"fieldId":"location","value":12});
r.setValue({"fieldId":"memo","value":null});
r.insertLine({"sublistId":"item","line":2});
r.setSublistValue({"sublistId":"item","fieldId":"item","line":2,"value":7360});
r.setSublistValue({"sublistId":"item","fieldId":"quantity","line":2,"value":4});
r.setSublistValue({"sublistId":"item","fieldId":"rate","line":2,"value":41.667});
r.setSublistValue({"sublistId":"item","fieldId":"description","line":2,"value":"Base install labor (Walkable) Labor Waste Factor -Good Shingles (# Squares of Waste)"});
r.setSublistValue({"sublistId":"item","fieldId":"line","line":2,"value":"a0qbV00000nkFC5QAM"});
r.insertLine({"sublistId":"item","line":3});
r.setSublistValue({"sublistId":"item","fieldId":"item","line":3,"value":7360});
r.setSublistValue({"sublistId":"item","fieldId":"quantity","line":3,"value":15});
r.setSublistValue({"sublistId":"item","fieldId":"rate","line":3,"value":45});
r.setSublistValue({"sublistId":"item","fieldId":"description","line":3,"value":"Base install labor (Walkable) Labor Pitch 3/12 (# Squares)"});
r.setSublistValue({"sublistId":"item","fieldId":"line","line":3,"value":"a0qbV00000nkFC6QAM"});
r.insertLine({"sublistId":"item","line":4});
r.setSublistValue({"sublistId":"item","fieldId":"item","line":4,"value":7301});
r.setSublistValue({"sublistId":"item","fieldId":"quantity","line":4,"value":15});
r.setSublistValue({"sublistId":"item","fieldId":"rate","line":4,"value":45});
r.setSublistValue({"sublistId":"item","fieldId":"description","line":4,"value":"Regular 1-layer tear-off (Walkable) Labor Pitch 3/12 (# Squares)"});
r.setSublistValue({"sublistId":"item","fieldId":"line","line":4,"value":"a0qbV00000nkFC7QAM"});
r.insertLine({"sublistId":"item","line":5});
r.setSublistValue({"sublistId":"item","fieldId":"item","line":5,"value":7403});
r.setSublistValue({"sublistId":"item","fieldId":"quantity","line":5,"value":30});
r.setSublistValue({"sublistId":"item","fieldId":"rate","line":5,"value":2});
r.setSublistValue({"sublistId":"item","fieldId":"description","line":5,"value":"Ridge vent install (non-walk) Labor Ridges - Good/Better (# Linear Feet)"});
r.setSublistValue({"sublistId":"item","fieldId":"line","line":5,"value":"a0qbV00000nkFC8QAM"});
r.save({"enableSourcing":false,"ignoreMandatoryFields":false});