Focus in the bottom of the page - Sort Descending

poppinspoppins Member Posts: 647
Hi everyone,
I have a custom list page where I wanted my record to be sorted descending: I applied the following in the SourecTableView Property:
SORTING(Insert Date) ORDER(Descending) (Insert Date is a datetime field and it is not the primary key).
The thing is that when I open the page, I get the focus on the bottom of it, not in the beginning...
How can I fix that?

Comments

  • joshuasungjoshuasung Member Posts: 37
    Findfirst on open trigger? If i understood your question correctly
    Joshua H Sung

    Sr. Project Manager
    S-Metric, LLC
    jsung@smetric.com
  • JDVyskaJDVyska Member Posts: 179
    Joshua has it. One of our customers wanted that for a variety of pages. You do the sort part you did, then in OnOpenPage trigger, add:
    IF Rec.FINDFIRST THEN;
    

    (Note: Always IF wrapper that one, or you'll be in for a nasty surprise if the table is blank)
    JEREMY VYSKA
    CEO, Spare Brained Ideas, Göteborg, Sweden
    New (April 2021) Getting Started with Microsoft Dynamics 365 Business Central Book Available: "Your First 20 Hours with Business Central"
Sign In or Register to comment.