Sales orders Blocked while importing sales Lines.

delaghetto
Member Posts: 89
Hi All!
I've developed a CodeUnit that imports about 10000 Sales Lines in 6 different sales order. The customers wants it this way, so I can't do anything about it. So the code loop does something like:
Read All lines into ExcelBuffer
Create Header 1
Create Sales Line 1
Create Sales Line 2
Create Sales Line 3
...
Create Sales Line 2000
Create Header 2
... etc.
Anyway, while importing the lines, which takes about 1 hour, the other users can't create new Sales Order. We get an error when trying to get a new Sales No. for the order. It says that the serial lines table is blocked.
Is there any workaround, so I can make sales orders while importing? I was reading about COMMIT, but not sure if this will help in my situation.
Thanks.
I've developed a CodeUnit that imports about 10000 Sales Lines in 6 different sales order. The customers wants it this way, so I can't do anything about it. So the code loop does something like:
Read All lines into ExcelBuffer
Create Header 1
Create Sales Line 1
Create Sales Line 2
Create Sales Line 3
...
Create Sales Line 2000
Create Header 2
... etc.
Anyway, while importing the lines, which takes about 1 hour, the other users can't create new Sales Order. We get an error when trying to get a new Sales No. for the order. It says that the serial lines table is blocked.
Is there any workaround, so I can make sales orders while importing? I was reading about COMMIT, but not sure if this will help in my situation.
Thanks.
0
Comments
-
You can do as Copy Document functionality running on sales or purchase document in standard NAV. I haven't checked it but it should solve your locking issue.0
-
"Copy Document" is intended for the purpose of copying existing NAV documents. Hence the name. How would this help in this situation where the process is importing sales line data from Excel? "Copy Document" has no functionality to handle that. Besides, it would have the same locking issues if dealign with this much data.
Yes, COMMIT will be part of your solution. You need to design a process to break this into smaller recoverable steps. Using COMMIT to end each step and commit the changes to the database. You must structure the process so it can recover from a failure without failing or creating duplicate orders or order lines. The smaller the steps, the shorter the locking events will be.
You might also need to some performance tuning.There are no bugs - only undocumented features.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions