title: SetAscending Business Central Sales Order List
body: <p>I am attempting to use the SetAscending in Visual Studio Code for Business Central Sales Order List Page.  It works to set the Sales Order &quot;No.&quot; field to descending however it does not reset the scrollbar to the top of the page.  I've tried adding it to multiple places and it sorts the page but no scrollbar update.  What code could I be missing?</p>
  <p>Places I've added it to:
  Sales Order List Page Extension - OnAfterGetRecord and OnAfterGetCurrRecord
  Sales Order List Page Events -  OnOpenPageEvent, OnAfterGetRecordEvent, and OnAfterGetCurrRecordEvent</p>
  <pre><code>trigger OnAfterGetCurrRecord()
      begin
          rec.SetCurrentKey(&quot;Document Type&quot;, &quot;No.&quot;);
          rec.SetAscending(&quot;No.&quot;, false);
      end
  </code></pre>
  <p><a href="https://i.stack.imgur.com/j4CRe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j4CRe.png" alt="enter image description here" /></a></p>