← Alle Beiträge

Sort keys back in NAV 2015 (and NAV 2013 R2)

Sortieren per Klick ist in NAV 2015 zurück — mit einer Einschränkung, die in der Praxis wehtut. Was funktioniert, was nicht, und wie man damit umgeht.

Diesen Beitrag gibt es nur auf Englisch.

Archive post from 2015. It describes Dynamics NAV and the Microsoft BI tools of that time; Dynamics 365 Business Central and today’s Power BI differ in places.

The good

One of the great new features of NAV 2015 is the possibility to sort on any column – similar to Excel where you can right click on any column. That feature was actually introduced with NAV 2013 R2. By clicking on the small arrow next to each column you may toggle between ascending and descending order:

Sort keys back in NAV 2015 (and NAV 2013 R2)

The bad

Some problems however occur when users are using this feature on pages that show a long list of records. One of our customers has a very high transaction volume and more than 20 million customer ledger entries. If a user by mistake clicks on the “wrong” column – especially on columns that are not covered by good indexes such as the Description-field the client may hang for minutes. Unfortunately NAV does not allow to limit sorting to certain columns – you either have full flexibility or no sorting at all. The contact list is an example where no sorting is possible – this is actually a side-effect of the indentation that this list provides showing contacts next to their company.

Sort keys back in NAV 2015 (and NAV 2013 R2)

The solution

Now since it is possible to deactivate the column sorting on very big transaction pages (by means of defining one dummy indentation column), it would still be very nice to provide users some “safe” sorting feature. We have not found anything about this on the web what is why we write this short article.

That feature can be developed with just a few lines of code – it is like bringing back some old feature into NAV. The result will look like the following:

Sort keys back in NAV 2015 (and NAV 2013 R2)

After clicking on the new Change Sort Order Action, a list of all active keys will be shown. Subsequently it is possible to switch between Ascending and Descending order.

Sort keys back in NAV 2015 (and NAV 2013 R2)

Technically the implementation is quite simple – it consists of just a few lines of code.

Please feel free to use the objects (text and fob). Integrating this into any list is quite easy, you just need to copy these three actions and the global variables from page 91004:

Sort keys back in NAV 2015 (and NAV 2013 R2)Sort keys back in NAV 2015 (and NAV 2013 R2)

It should work out of the box for any record-based tabular page (lists, subpages, worksheets). We hope this is helpful to anyone.

Nächster BeitragNeue Lösung zur Absatzplanung bei Olympus

Fragen zu diesem Thema?

Sprechen Sie uns an — wir teilen unser Wissen gerne, auch über den Blog hinaus.

Kontakt aufnehmen