When updating a Netsuite record with related list record via SOAP API, Netsuite will tend to remove and replace the existing list record with the new list contains in the request. For example, I have an Invoice (Invoice object) with 2 line items (itemList list object) in Netsuite. I would like to create another new line item into the same Invoice via SOAP API. To do so, I created a simple operation in Boomi process and post the following data to Netsuite to perform an update.
Figure 1: Sample Netsuite request
As soon as the Boomi process is executed, all the existing line items in the Invoice are replaced with the new one that I inserted through SOAP API.
After doing some research, I found that this can be prevent by setting the “replaceAll” attribute on the list to “false”.
Figure 2: Sample Netsuite request with “replaceAll” attribute
The scenario above is about creating new line items into an existing Invoice. If you would like to update an existing line item in the Invoice, you just need to set the “replaceAll” attribute to “false” and specify the correct line id.