How to sort subform lines based on column

itortu
Member Posts: 5
I have a request to change the way that the lines are displayed on a NAV sub-form/ page.
I would like to use a specific column to assign a default order by sorting to the lines.
Is this a relatively easy to intermediate type of change? I am not very versed in writing C/AL code and working with record sets in the object designer.
Any help, recommendations, code examples would be great if you have any.
Thank you.
I want to sort by Annual Volume (desc)
I would like to use a specific column to assign a default order by sorting to the lines.
Is this a relatively easy to intermediate type of change? I am not very versed in writing C/AL code and working with record sets in the object designer.
Any help, recommendations, code examples would be great if you have any.
Thank you.
I want to sort by Annual Volume (desc)
Alejandro
--
Es buen ejercicio acostumbrarse a la compañia de la gente sencilla pues tanto la humildad como la soberbia se transmiten a menudo por simple contacto.
--
Es buen ejercicio acostumbrarse a la compañia de la gente sencilla pues tanto la humildad como la soberbia se transmiten a menudo por simple contacto.
0
Comments
-
Hi, it's very easy: create the key on the table (View -> Keys and specify the target field); after, on the subpage object, change the key of SourceTableView table.* Daniele Rebussi * | * Rebu NAV Diary *0
-
Hi. Thank you for the reply. I did created a new key. I was told that this will only be for viewing and that the sort by should be changed to the original when adding a new line item.
Is this correct?
What can be affected if I change the default key on the object? Will that mess up the line enumeration?
Thank you.Alejandro
--
Es buen ejercicio acostumbrarse a la compañia de la gente sencilla pues tanto la humildad como la soberbia se transmiten a menudo por simple contacto.0 -
Yes, secondary keys are meant for sorting and when you insert a new record the costraints of primary key are checked ("Line No." for example).
I strongly discourage to add your "Annual Volume" field to the primary key since, as far as I see from attachment, you are working with standard sales line/purchase line and this could have a huge impact on processes.* Daniele Rebussi * | * Rebu NAV Diary *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