Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

List Page Opening With Record at the Bottom Selected

Posted on by 326

I have a list page that is opening with the the last row of the list selected. I am using the SourceTableView property to set the sort order of a column (Due Date) that I also added as a key. The sort order of the records in the column is correct, but for some reason it always opens with the last row of the page selected.

In the documentation, the remarks say:

"When you combine a descending sort order on SourceTableView with overriding the OnFindRecord, you may experience that the page displays the last record instead of the first when the page opens. You can resolve this condition by adding Rec.FindFirst in the OnOpenPage trigger, or using Find(-) in the OnFindRecord trigger." 

I added a Rec.FindFirst to the OnOpenPage trigger per the recommendation, but the page still loads with the last row selected instead of the top row.

I came across this other thread where another user experienced the same issue, but none of these methods seem to work either. 

https://stackoverflow.com/questions/65395797/setascending-business-central-sales-order-list

pastedimage1682390190520v1.png

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: List Page Opening With Record at the Bottom Selected

    Thanks for update.

  • dkkipfer Profile Picture
    dkkipfer 326 on at
    RE: List Page Opening With Record at the Bottom Selected

    I found some code that was hiding in an OnFindRecord on the page. I modified that to end with Find('-') and now it's working as expected.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans