Find the "real" next line number
GaryD
Member Posts: 66
Hello all. We've got the sales order subform showing lines that the users don't necessarily want to see, so we've added a checkbox allowing them to hide those lines. This is done using a filter. The problem with this is that when the filter is in place and we try to insert a new line we get an error saying that this Document Type/Document No./Line No. combination already exists. Seems that it is determining the next line number based upon the the filter that's in place so ends up trying to use a line number that already exists but is filtered out. Is there a way around this or should NAV even be using a filtered set of data to return the next line number?
Thanks in advance!
Thanks in advance!
0
Comments
-
As you can see, it is not possible to just filter some lines out and still use the standard SplitKey function to number the lines. You need to add own function to find next line no. e.g. in OnNewRecord (Form) or OnInsert trigger (Table).0
-
can you give an example of lines they don't want to see?0
-
As far as examples, it's mainly just comment records at the vendor, item, or customer level. They can increase the number of detail records by quite a few and sometimes it's just easier if you can clear them from the form. We've already coded in the OnInsert trigger to do what we want, with some special handling around the AutoSplitKey. Thanks for your input!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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 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
