Line No from Purchase Order line
tompynation
Member Posts: 398
Where can i find the code which creates the Line No. for the Purchase Order?
I need to adapt this...
I need to adapt this...
0
Answers
-
You're looking for the autosplitkey - search form for that or use c/side reference guide
viewtopic.php?t=20168
viewtopic.php?f=23&t=25952
I don't think you can alter that but you could remove/disable it but you'll have to comeup with you're own code to create line no's then.0 -
well, i see the auto split key property... But where does it now say that it should add 10000 for each new Line No.
Or when i just put this autosplit key to No, would the only thing to be done then is adding some code
to the OnInsert trigger of the Purchase Line table to fill up the Line No.? Or is this much more complex then how i see it?0 -
I think you can't change the 10000. It's there to allow you to add a number of new lines in between existing lines...0
-
tompynation wrote:Or when i just put this autosplit key to No, would the only thing to be done then is adding some code
to the OnInsert trigger of the Purchase Line table to fill up the Line No.?
I think yes, How or why did you need to Alter this?0 -
well, i have added a new type to the Purchase Lines, namely 'Set'
When you enter a set, there are some purchase line that get automatically created...
SO when you add the Set 'MTBKGR' with line no 20000
There are automatically 2 new Purch Lines created, with Line No's: 20100 & 20200...
So they are under the 20000 so you now that these belong to the Set line 20000
When you now add a new Item purchase Line then his Line No. is 30200. Which i dont want. Cause that looks like its an item which is Under a the Set Line 30000, but this isnt the case... Its a normal entered line.0 -
Its working now like it should by disabling the AutoSplitKey property and adding the Following code to the OnInsertTrigger
lv_PurchLine.RESET;
lv_PurchLine.SETRANGE("Document No.","Document No.");
IF lv_PurchLine.FIND('+') THEN
"Line No." := ROUND(lv_PurchLine."Line No.",1000,'=') + 10000
ELSE
"Line No." := 10000;0 -
Actually the line no is not something "used" by the user. What I would do would be to let Nav give the line no it wants and create an extra field that when the line belongs to a set, it contains the set's line number. This way you can distinguish the lines belonging to the same set regardless the line's appearance.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions