Stop Multiple Users From Running Sales Order Import at the same time
If multiple users run sales order import at the same time as another user or a scheduled deferred processing job they will often lock up one another or the deferred processing job will lock and need to be reset.
There should be a way to avoid the lockups.
Straight from the man himself:
I think there’s a few areas we can look into:
(1) We need to have a mechanism for the defer processing not to lock up and just skip the job with printing something like “Sales Order Import Skipped Due to CPIMPHDR work file is in used by other users” on the report.
(2) We need to check when sales order import close the work files. We probably should close the work files in the beginning of the closing-procedure paragraph, before closing the printers. I said this because it seems USER is hugging this CPIMPHDR file for a long time. Probably he is just looking at the import result on the screen. If we close CPIMP*.BTR files before displaying the report on the screen, then this issue will less likely to happen.
The change for (1) was completed. The new logic is that if there are two users (including defer processing) trying to perform sales order import at the same time, the 2nd user will get proper message without file accessing error and thus stop the defer processing.