ANS-1838 · CSV IMPORT & DATA MIGRATION
How to Prevent CSV Imports from Overwriting Existing NetSuite Transaction Lines?
Learn how to configure your NetSuite CSV import to add new transaction lines instead of updating existing ones by leveraging the LineId field.
Short answer
To prevent NetSuite CSV imports from overwriting existing transaction lines, include a 'LineId' column in your CSV file. Leave this column empty for new lines and map it to the 'Items:Line Id' field during import. This ensures NetSuite creates new lines by not matching existing LineId + Item ID combinations.
Scenario
By default, NetSuite's CSV import functionality is designed to minimize transaction line count. When importing data for a transaction that already contains a line for a specific item, NetSuite will typically overwrite the existing line rather than creating a new one. This behavior occurs because NetSuite attempts to match items to existing lines.
Solution
To force NetSuite to create new transaction lines instead of overwriting existing ones during a CSV import, utilize a combination of the Item and LineId fields in your mapping:
Add a 'LineId' column to your CSV file. For every line intended to be new, leave this column empty.
During the CSV import configuration, map this newly added column to the
Items:Line Idfield.Execute the import.NetSuite uses the combination of
LineIdandItem IDas a unique key to identify a transaction line. When an emptyLineIdis specified in the import, NetSuite cannot match it to any existing line, thus prompting the creation of a new line.Consider the following comparison NetSuite performs to determine if a new line is needed:Existing line:LineId1andItem A--> Key'1 ItemA'New line from CSV file:LineId''andItem A--> Key'ItemA'Since the keys do not match, a new line will be created.This functionality is part of NetSuite's 'Keyed Sublists' feature. For more detailed information on how keyed sublists work and the specific keys for various sublist types, search for 'Keyed Sublists for CSV Import' in the NetSuite Help documentation.
Expert NetSuite Support
Need help with this NetSuite issue?
CSV Import & Data Migration consulting and configuration support
