When two people edit the same record in your business app
Plan what happens when two staff members save the same record. Use two sessions to check conflict messages, draft recovery and the final saved values.
By Noe Guerrero III
Two people can have permission to edit a work order and still overwrite each other's changes. One person opens it at the counter, another opens it in the warehouse, and both start typing. If the app accepts the second person's whole form without checking what changed, a detail from the first save can disappear.
For a business app, decide how a save from an older version of a record should behave. Then test that decision with two separate sessions. The person making the second save needs a clear result, a way to recover their work and an accurate view of what the app actually kept.
Follow one work order through two saves
Imagine a Rio Grande Valley equipment rental business with a work order that says pickup is at 3 p.m. Ana and Luis open the same order. Ana changes pickup to 4 p.m. and saves. Luis adds “Bring the loading straps” to the instructions, but his screen still shows 3 p.m. When he saves, what should happen to the pickup time?
That depends partly on what the app sends. A form that sends every field could put 3 p.m. back. Sending only the edited instructions can avoid that particular overwrite, though it still leaves questions about fields whose values depend on each other. Ask your developer to show the stored record after each save. A success message on both screens gives you too little information to judge the result.
You also need a rule for two people changing the same field. Repeat the example with Luis changing pickup to 5 p.m. while Ana changes it to 4 p.m. For this work order, a reasonable choice is to stop the second save and ask that person to review the current pickup time. Agree on that behavior before approving the feature.
Permissions answer who can make the change. The concurrent edit rule answers what happens when authorized changes overlap. You can plan both while defining the job each staff role needs to do. Plan permissions for a business app
Give the second person a useful way forward
A conflict message should explain what happened in terms of the record. For this example, “This work order changed after you opened it. Review the current version before saving” gives Luis a reason to pause. Keep his unsaved changes available while he reviews the change. Making him reconstruct a long note adds work to a situation the app already detected.
Show the current saved values beside the proposed changes when a comparison is needed. Identify the field clearly. If Luis decides to keep Ana's 4 p.m. pickup and add his loading note, show that combined result before he saves it. Check again at that save, because someone else could have edited the order during his review.
Microsoft's EF Core documentation describes resolving conflicts by loading current data or merging proposed changes with saved values. The application chooses how to resolve those differences. Microsoft guidance on concurrency conflicts
Automatic merging deserves its own business rule. A change to a delivery address and a change to the delivery area might be related, even though they are different fields. Have the person responsible for dispatch explain which combinations need review. A developer can implement a consistent rule once the team agrees what the final record is allowed to say.
Ask where the version check happens
The app can keep track of the version a person opened and compare it with the current version when they save. The check and the update need to work together so a change cannot slip in between them. Ask your developer how the server enforces this for every route that updates the record, including imports or integrations that your team uses.
For an HTTP API, one mechanism is an entity tag, or ETag, sent back in an If-Match condition. The HTTP standard describes using that condition to prevent accidental overwrites. When it fails, the requested change must be stopped. The app still needs to explain the result and help the person continue. HTTP conditional requests in RFC 9110
For staff who also edit while disconnected, include queued changes in the plan for when their device reconnects. Plan offline app behavior
Keep the discussion tied to the work order. Ask what the second person sees, which fields remain saved and whether their unsaved text survives the review. Those answers make the behavior reviewable even if you don't read application code.
Run the test with two sessions
Use a test environment and a sample order. Give each session a staff account allowed to edit that order. Two browser profiles or two devices let you keep the accounts separate. Start each case with a known pickup time and instructions so you can tell exactly what changed.
Open the same sample order in both sessions before editing either one. Record the starting values.
Change pickup to 4 p.m. in the first session and save. Confirm the stored value by reopening the order.
In the second session, which still has the older version, change pickup to 5 p.m. and try to save. Check that the agreed conflict behavior occurs and that 4 p.m. remains stored.
Follow the review steps in the second session. Choose an allowed final value, save it and reopen the order in both sessions. Both should show that value.
Repeat the conflict, then save another change in the first session while the second person is reviewing. Try to save from that older comparison. Confirm the app checks for the newer change and brings the reviewer up to date.
Reset the sample and repeat with changes to different fields. Check the final pickup time and loading instructions against the merge or review rule you agreed on.
Record the build, the order used, the sequence of saves and the expected and observed values. Include what happened to the second person's unsaved text. Give the developer that sequence when a result differs, then rerun it after the fix. Keep the example in the acceptance notes so a later change to the form can be checked against the same behavior.