The sales line already exists...

yuppicide
Member Posts: 410
Using Navision 3.10..
I have a semi-difficult customer.. they want us to enter the items on Sales Order in order of material.. ie: cotton, rayon, knit, etc. They're an international customer and maybe they do this for customs.. not sure.
So, let's say I have entered 10 items on a Sales Order. I put them in the correct order the customer wanted, but I messed up two items. I want to delete those two lines and re-add them elsewhere.
Sometimes it will not let me do this.. it will say "The sales line already exists.", but it never has a problem adding it at the very end of my order.
Is there some place I should go looking for a coding error or am I taking on too much here?
I have a semi-difficult customer.. they want us to enter the items on Sales Order in order of material.. ie: cotton, rayon, knit, etc. They're an international customer and maybe they do this for customs.. not sure.
So, let's say I have entered 10 items on a Sales Order. I put them in the correct order the customer wanted, but I messed up two items. I want to delete those two lines and re-add them elsewhere.
Sometimes it will not let me do this.. it will say "The sales line already exists.", but it never has a problem adding it at the very end of my order.
Is there some place I should go looking for a coding error or am I taking on too much here?
0
Comments
-
The problem is autosplitkey. That needs the order of the sales lines to be in the primary key order. You probably have the lines in a different order.
Let's say you have an order with items Z1, Z2 and Z3 (which would have line numbers 10000, 20000 and 30000). Now you add Item A1 to the end of the order. Autosplitkey creates the new line with line number 40000, and when the line is inserted into the database, the form reshuffles the lines, and line 40000 is actually at the top of the lines, because its item number starts with an A. Now you go to the end of the order, and you enter another item. Autosplitkey will use number 40000 again, and that's when you get the error that line 40000 already exists.
What you should do is keep the lines for data entry at the primary key, and only change the sort order on the report.0 -
Hi,
How are you inserting the line - using the normal F3 between lines?
Check that the subform for entering the lines is set for AutoSplitKey. Turn on the debugger and look to see where the error is being generated from and this will point you in the direction of the code causing the problem0
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