By default, NetSuite replaces every line when a user makes a change to one line on a transaction and selects the update Action. This can result in a loss of data, especially if you are not including all of the fields on your template and providing values for them.
This article shows how to update only select lines, which may incrementally improve performance depending on the number of lines updated. We'll be making use of the replaceAll attribute.
⚠️ Important Scope
This approach applies only to record types with keyed sublists, such as:
Sales Orders
Invoices
Vendor Bills
It does not apply to record types with non-keyed sublists, such as:
Journal Entries
Expense Reports
For non-keyed sublists, NetSuite will always remove and replace all lines.
➡️ To learn more, see NetSuite documentation on keyed vs non-keyed sublists.
Understanding the replaceAll attribute
replaceAll = TRUE (Default NetSuite behavior)
The existing sublist is replaced with the sublist submitted in the SOAP web services request.
The newly submitted sublist should include all values.Lines that do not match the newly submitted lines are removed.
Currently, existing lines that match lines in the new sublist submission are updated.
Newly submitted lines with no matches are added.
replaceAll = FALSE
Lines in the existing sublist are selectively updated with lines in the sublist submitted in the SOAP web services request.
The newly submitted sublist needs only to include values to be added and updated.Lines that do not match the newly submitted lines are preserved.
Currently, existing lines that match lines in the new sublist submission are updated.
Newly submitted lines with no matches are added.
💡 Key takeaway:
Set replaceAll = FALSE to update only the lines you specify and keep everything else intact.
🚨 Read Before You Proceed
Do not simply delete rows you don’t want to update without configuring replaceAll.
If you do, NetSuite will remove all other lines and keep only the submitted ones.
Always follow the steps below and start with a small test dataset.
How to Update Only Selected Lines (Safely)
Step 1: Add Required Fields to the Template
Add the following fields to your template:
Transactions with items
itemList.replaceAllitemList.item.line
Transactions without items
lineList.replaceAlllineList.line.line
📝 Note:
The *.line field represents the line number and is usually added automatically when you load a template.
Step 2: Ensure Line Numbers Are Populated
Confirm the line number field has values.
If missing, use Reload/Refresh to populate line numbers.
Step 3: Set replaceAll to FALSE
For the rows you want to update, set:
itemList.replaceAll = FALSEorlineList.replaceAll = FALSE
This tells NetSuite to process only the submitted lines.
Step 4: Keep Only the Lines You Want to Update (Optional)
You may remove rows that do not require updates.
Ensure the remaining rows include:
Valid line numbers
replaceAll = FALSE
Step 5: Upload the Update
Upload the records back to NetSuite.
Only the specified lines are updated.
All other lines and values remain unchanged.
What Happens After the Update
Selected lines are updated or added.
Existing lines not submitted are preserved.
Fields not present in the template are not overwritten.
Performance may improve when updating a small number of lines.
Summary
NetSuite defaults to replacing all lines on update.
Use
replaceAll = FALSEto update only selected lines.Works only with keyed sublists.
Prevents accidental data loss.
Always test with a small dataset first.
Need Help?
If you’re unsure whether your record type supports this method or need help configuring templates:
🔍 Visit the Help Center: https://www.cloudextend.io/support/
💬 Use the in-app chat
✉️ Email cloudextend-support@celigo.com
📎 Include the record type and a screenshot of your template fields if possible.
