Sales Line "Line No." field issue

markb
Member Posts: 6
Within the past week, a strange issue is sporadically occurring.
When entering a new quote/order, the first sales line "Line No." is assigned 10000. (Like it should be)
However, Navision is occasionally assigning lower "Line No." numbers for subsequent line items. For example, the 2nd line item is assigned 5000.
It's acting like your entering a new line between two existing lines and the AutoSplit key is taking over. However, this is happening on the very bottom line.
In some cases, I have created "test" quotes with two line items like this:
Line item # 1: Type = Item, Line No. = 10000
Line item # 2: Type = Resource, Line No. = 20000
And when I converted it to an order, it did this:
Line item # 1: Type = Item, Line No. = 10000
Line item # 2: Type = Resource, Line No. = 5000
Has anybody ever seen this???
When entering a new quote/order, the first sales line "Line No." is assigned 10000. (Like it should be)
However, Navision is occasionally assigning lower "Line No." numbers for subsequent line items. For example, the 2nd line item is assigned 5000.
It's acting like your entering a new line between two existing lines and the AutoSplit key is taking over. However, this is happening on the very bottom line.
In some cases, I have created "test" quotes with two line items like this:
Line item # 1: Type = Item, Line No. = 10000
Line item # 2: Type = Resource, Line No. = 20000
And when I converted it to an order, it did this:
Line item # 1: Type = Item, Line No. = 10000
Line item # 2: Type = Resource, Line No. = 5000
Has anybody ever seen this???
0
Comments
-
It seems that you are using another key than primary key to sort the lines on the form. Check that...0
-
check if there are a other key used in form, or if the key is desc. or if there are a filter and you doesn't see all recs in the form. So the autosplit key can't work well.
regardsDo you make it right, it works too!0 -
The sales line form is definately being sorted by the primary key:
Document Type,Document No.,Line No.
I did noticed that, when changing the TYPE, it will not always change to what I selected, such as Resource. I have to select it twice from the drop-down. Doesn't happen every time but, when it DOES, is when it screws up the numbering. It's almost as if there is a ghost line item with a Line No. of "0" so my new entry gets insert between "0" and "10000", since the new entry's Line No. is "5000".0 -
Than try use debugger to trace what is happening.0
-
I have tried using the debugger and noticed that, when you change the TYPE, it triggers the CAL event the moment you click on your new selection. But those times when my new selection DOESN'T take, no events are triggered. It almost feels like there's a hesitation taking place.
Like, perhaps, a network problem.
I think I'll start looking into that possibility because, after all, it IS a sporadic issue.0 -
markb wrote:Within the past week, a strange issue is sporadically occurring.
When entering a new quote/order, the first sales line "Line No." is assigned 10000. (Like it should be)
However, Navision is occasionally assigning lower "Line No." numbers for subsequent line items. For example, the 2nd line item is assigned 5000.
It's acting like your entering a new line between two existing lines and the AutoSplit key is taking over. However, this is happening on the very bottom line.
In some cases, I have created "test" quotes with two line items like this:
Line item # 1: Type = Item, Line No. = 10000
Line item # 2: Type = Resource, Line No. = 20000
And when I converted it to an order, it did this:
Line item # 1: Type = Item, Line No. = 10000
Line item # 2: Type = Resource, Line No. = 5000
Has anybody ever seen this???
It's called inserting between lines...
if you are inserting before of the first line it takes as line no. the middle number between that line (10000) and the previous line, since there is no previous line, that no. is 0.0 -
I understand what it's supposed to do when inserting between or before an existing line. What I'm saying is that it's doing it when I add a new line at the bottom.0
-
markb wrote:I understand what it's supposed to do when inserting between or before an existing line. What I'm saying is that it's doing it when I add a new line at the bottom.0
-
markb wrote:I have tried using the debugger and noticed that, when you change the TYPE, it triggers the CAL event the moment you click on your new selection. But those times when my new selection DOESN'T take, no events are triggered. It almost feels like there's a hesitation taking place.
Like, perhaps, a network problem.
I think I'll start looking into that possibility because, after all, it IS a sporadic issue.
Ok, when you are not changing the type, you can check this:
1) On the form check the OnNewRecord trigger.
2) In OnInsert on the table, check if the Line No. is already filled in when the trigger is called. Check if there is correct value.0 -
Just go to the Table designer and look at Table 37 filtered by the Order number. Most likely you have an add on or some custom code that is inserting some hidden lines, like Kits or a BOM mod. Maybe is it not correctly handling the transition from item to Resource, because it had already inserted some line which it then tries to delete, and changes sorting or filtering in the mean time.David Singleton0
-
Kamil,
Regarding step 2
<<2) In OnInsert on the table, check if the Line No. is already filled in when the trigger is called. Check if there is correct value.>>
I'm not sure how I can make sure that the value is correct.
How would I know if the line is be inserted at the bottom or between existing records??0 -
markb wrote:Kamil,
Regarding step 2
<<2) In OnInsert on the table, check if the Line No. is already filled in when the trigger is called. Check if there is correct value.>>
I'm not sure how I can make sure that the value is correct.
How would I know if the line is be inserted at the bottom or between existing records??David Singleton wrote:Just go to the Table designer and look at Table 37 filtered by the Order number. Most likely you have an add on or some custom code that is inserting some hidden lines, like Kits or a BOM mod. Maybe is it not correctly handling the transition from item to Resource, because it had already inserted some line which it then tries to delete, and changes sorting or filtering in the mean time.
](*,)David Singleton0 -
markb wrote:Kamil,
Regarding step 2
<<2) In OnInsert on the table, check if the Line No. is already filled in when the trigger is called. Check if there is correct value.>>
I'm not sure how I can make sure that the value is correct.
How would I know if the line is be inserted at the bottom or between existing records??
You know as user if you hit the F3 when you are on the last record or not... and you need to look on the record line no. and the next record line no to know which line no you need to be used (you need what you are really doing and compare it with what system creates for you).0 -
There might be hidden lines, like the ones that you can't see from the form. It LOOKS as though there are none, but there might be hidden lines that cause the keysplitter to put in those funky numbers. Autosplitkey activity will not show up in the debugger.
Follow David's advice and check the tables from the object designer.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