Presort form data source grid

D365 Tech Support Forums Finance and Operations Forms/UI Presort form data source grid

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #964
    ConveyPhantom
    Participant

      I have a custom form that is just a simple list view that displays a log of transactions for a custom integration. I want this form to open up pre-sorted so the most recent transactions are on top how can I do that?

      #1003
      FitVibes24
      Participant

        This is an example – you can add code like this to the form data source to run when initialzied.

        [DataSource]
        class CustomDataManagementIntegrationLog
        {
        /// <summary>
        /// Pre-sort form data source
        /// </summary>
        public void init()
        {
        super();

        this.queryBuildDataSource().addSortField(fieldNum(CustomDataManagementIntegrationLog, CreatedDateTime), SortOrder::Descending);
        }

        }

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      D365 Tech Support