
High-volume integrations in NetSuite can expose one of the platform’s most common pain points: record locking conflicts. When multiple processes attempt to update the same record at the same time, users often encounter the dreaded “Record has been changed” error, leading to failed transactions, data loss, and operational slowdowns.
In this blog, we walk through how GIR Software Services designed a NetSuite record locking mitigation strategy for Corey Construction using NetSuite asynchronous processing, scheduled scripts, and CSV imports. The result was a scalable, real-time solution that eliminated concurrency errors while maintaining data integrity across Jobs, Customers, and Sales Orders.
Project Context and Initial Challenges
Client Goal
Corey Construction needed to ensure that every Sales Order created for a Job was automatically assigned the correct jobsite address, sourced directly from custom fields on the Job record with minimal delay and no manual intervention.
The Original Problem: NetSuite Record Locking Errors
Job records were created through a high-volume Restlet API that frequently submitted dozens of Jobs in a single payload. All Jobs were linked to the same parent Customer.
Each Job creation triggered a synchronous User Event (UE) script designed to:
- Add the jobsite address to the Customer Address Book
- Assign that address back to the Job
However, because multiple UE scripts attempted to modify the same Customer record simultaneously, NetSuite consistently threw record locking errors, causing:
- Job creation failures
- Incomplete address assignments
- Data loss during peak operations
This scenario is a textbook example of SuiteScript record locking caused by concurrent writes to a shared record.
Brainstorming and Architectural Decision
Initial Consideration: Map/Reduce Processing
A traditional approach was considered:
- Run a Map/Reduce script every 15 minutes
- Identify newly created Jobs
- Add missing addresses sequentially
- Update Jobs after processing
While this would have resolved the concurrency issue, it failed a critical business requirement.
Why It Was Rejected
Corey Construction required address assignment to be near-instantaneous. A 15-minute delay was not acceptable for downstream Sales Order processing.
Final Decision: Asynchronous Queue-Based Processing
To fully address NetSuite concurrency handling, GIR Software Services decoupled the Customer update logic from the synchronous transaction flow.
The winning architecture:
Synchronous Trigger → Asynchronous Queue → Sequential Update
This design leveraged:
- NetSuite scheduled script CSV import
- Built-in sequential task processing
- Controlled retries for guaranteed data consistency
Learn more about our NetSuite ERP solutions here
The Three-Script Asynchronous Solution
The final solution uses three coordinated SuiteScripts to automate address creation and eliminate locking conflicts.
Script 1: User Event Script (Job afterSubmit) – The Trigger and Queue Filler
This script executes immediately when a Job is created.
Key responsibilities:
- Checks for an existing address on the Customer
- Assigns instantly if the address already exists
- Queues asynchronous processing if the address is new
Instead of modifying the Customer directly, the script:
- Generates a single-row CSV file
- Stores it in the File Cabinet
- Triggers a Scheduled Script task
This approach offloads Customer updates, preventing record locking at the source.
Script 2: Scheduled Script (execute) – The Orchestrator and Retry Mechanism
This script is the backbone of the solution.
Why it works:
- Multiple deployments handle high volume
- CSV imports are processed sequentially by NetSuite
- Eliminates simultaneous Customer record edits
Core logic flow:
- Submit the CSV file via task.TaskType.CSV_IMPORT
- Poll until the import completes
- Confirm the new address is searchable
- Update the Job with the address internal ID
- Retry Sales Order updates if they were created concurrently
- Clean up the temporary CSV file
This ensures NetSuite customer address automation without sacrificing real-time responsiveness.
Explore our NetSuite automated services capabilities: Link
Script 3: User Event Script (Sales Order afterSubmit) – The Synchronous Fallback
This script ensures Sales Orders receive the correct address as early as possible.
How it works:
- Runs on Sales Order creation
- Looks up the linked Job
- Checks whether the address is already populated
Two possible outcomes:
- Address exists → SO is updated immediately
- Address pending → Script exits silently, and the Scheduled Script completes the update shortly after
This guarantees no Sales Order is left without the correct jobsite address.
Conclusion and Business Impact
By implementing a fully asynchronous NetSuite architecture, GIR Software Services helped Corey Construction eliminate record locking issues while maintaining speed, reliability, and scalability.
Key Results
- Record locking errors eliminated
- Consistent address integrity across Customers, Jobs, and Sales Orders
- High-volume Restlet payloads processed reliably
- No manual intervention required
This solution demonstrates how NetSuite asynchronous processing and scheduled script CSV imports can be combined to solve even the most complex concurrency challenges.
Conclusion
If your NetSuite environment struggles with concurrent integrations, record locking, or high-volume automation, an asynchronous design may be the key to unlocking stability and performance.
At GIR Software Services, we specialize in solving advanced NetSuite challenges through smart architecture and automation.
View our NetSuite SuiteCommerce services: Link
Explore real-world client solutions: Link
Ready to optimize your NetSuite instance? Contact us
Know a business we could help?




