Disabling sorting on specific columns on pages

Cem_KaraerCem_Karaer Member Posts: 281
Hello,
I want to disable automatic sorting on flowfield columns on pages. I know how to disable sorting for all columns but it does not apply to my problem because I don't want to lose automatic sorting facility for all columns but rather disable it for some specific columns.
Thanks in advance.
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005

Best Answer

Answers

  • rehansattirehansatti Member Posts: 36
    Hi @Cem_Karaer ,
    FlowField can not be part of a key and therefore can not be used for sorting. If you want to sort some specific column. Check if the key exist of that combination in the table kes list. If it does not exist make a combination of the key with respective columns which you want to sort. After that go to page and set that key to "sourcetableview" property as follows.

    n9dz889lo4gd.png

    Please verify the answer.
    Best Regards
    Rehan Satti
    Microsoft Dynamics NAV Technical Consultant
    Please verify the answer if it satisfy your question. This will help other members of community.
  • Cem_KaraerCem_Karaer Member Posts: 281
    Hello Rehan, thank you for your interest. But it is not what I am asking for. As you can see in the following screenshot you can sort the posted sales invoices by amount on the page even though there is no key having Amount field in the underlaying source table (Sales Invoice Header). This is a generic and automatic facility coming with RTC. And it is a perfect novelty but sometimes I have to disable it. But how can I do it for specific columns?

    lg8xtcoia8fu.jpg
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • RockWithNAVRockWithNAV Member Posts: 1,139
    Heu Cem_Karaer,

    I dont think its possible in standard NAV. It's a RTC feature.
  • rehansattirehansatti Member Posts: 36
    Hi @Cem_Karaer ,
    we can do this. Go to the Posted sales Invoice Page 143. design it and go to the Repeater section of the page. Open the Property window of the page and set the "IndentationColumnName" property to 0 as follows. This will remove the default sorting fro the column.

    tzzn3yxc679j.png
    of2v8ywwbe61.png
    Best Regards
    Rehan Satti
    Microsoft Dynamics NAV Technical Consultant
    Please verify the answer if it satisfy your question. This will help other members of community.
  • Cem_KaraerCem_Karaer Member Posts: 281
    Thank you Rehan again. I appreciate your efforts. But as I said in my first entry it is the way to disable sorting for all columns but I need to disable sorting for some of columns.
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • Cem_KaraerCem_Karaer Member Posts: 281
    Thank you Rehan. I hope it will be possible to disable automatic sorting for some of columns in the future releases.
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    @Cem_Karaer it is not possible to disable the sorting unfortunately. It is the feature of RTC. May be in the next versions it is possible.
    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
  • mgnmgn Member Posts: 39
    Has anyone found a way to 'reset' the manual sorting?
    Eg. the subpage on Sales Documents is based on table Sales Line. The default sorting is based on "Line No." (and this makes sense when the AutoSplitKey is set to YES). But this field is not on the Page.
    So, how to reset this default sorting after a user has (accidentally) clicked on the column header of No., Quantity or any other field?
    So far I only found that the 'Reset Defaults' button on the 'Customize Document Layouts'. But this resets all the layout customizations...
  • AntHillMobAntHillMob Member Posts: 79
    Read the field value into a variable on the OnAfterGetRecord trigger and replace the column on the list with the variable. Because it is a variable. not table field it will not be sortable but the other columns still will be. It's a bit of a pain as you will then need to replicate the drilldown functionality in code if required but will certainly fulfil the requirement.
  • mgnmgn Member Posts: 39
    AntHillMob wrote: »
    Read the field value into a variable on the OnAfterGetRecord trigger and replace the column on the list with the variable. Because it is a variable. not table field it will not be sortable but the other columns still will be. It's a bit of a pain as you will then need to replicate the drilldown functionality in code if required but will certainly fulfil the requirement.

    I understand that it can be done by customizing the object. But is there no standard (out of the box) functionality to do this ???
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Nope. It is a bit annoying but there is nothing build in.

    The workaround is to add an action on a page to reset the sorting or to add the Line No. to the subpage
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • mgnmgn Member Posts: 39
    Clear.
    Thanks AntHillMob and Slawek.
    In the mean-time I found this blog of Julian navida.eu/2015/06/04/sort-keys-back-in-nav-2015-and-nav-2013-r2/
Sign In or Register to comment.