December 2023 Cumulative Updates for Dynamics 365 Business Central

The December updates for Microsoft Dynamics 365 Business Central are now available.

Before applying the updates, you should confirm that your implementation is ready for the upgrade and ensure compatibility with your modifications. Work with a Microsoft Partner to determine if you are ready and what is needed for you to apply the update.

Please note that Online customers will automatically be upgraded to version 23.2 over the coming days/weeks and should receive an email notification when upgraded.

Direct links to the cumulative updates are listed here:

Dynamics 365 Business Central On-Premises 2023 Release Wave 2 – 23.2 (December 2023)

Dynamics 365 Business Central On-Premises 2023 Release Wave 1 Updates – 22.8 (December 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 2 Updates – Update 21.14 (December 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.18 (October 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 2 Updates – Update 19.18 (April 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.18 (October 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 2 Updates – Update 17.17 (April 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 1 Updates – Update 16.19 (January 2022)

Dynamics 365 Business Central On-Premises 2019 Release Wave 2 Updates – Update 15.17 (April 2021)

Dynamics 365 Business Central On-Premises Spring 2019 Updates – Update 52 (October 2023)

Dynamics 365 Business Central On-Premises October’18 Updates – Update 18 (April 2020)

Microsoft Dynamics NAV 2018 – Update 60 (January 2023)

Microsoft Dynamics NAV 2017 – Update Update 61 (January 2022)

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Permanent link to this article: https://www.dvlprlife.com/2023/12/december-2023-cumulative-updates-for-dynamics-365-business-central/

Microsoft Dynamics 365 Business Central: Keep your currency exchange rates up-to-date automatically

Microsoft Dynamics 365 Business Central offers a multicurrency feature that allows users to work with different currencies. This feature lets users process payments and invoices in various currencies and adjust exchange rates. Multicurrency functionality enables businesses to operate globally, deal with international customers and suppliers, and accurately track financial transactions in different currencies. Users can set up new currencies, define exchange rates, process sales and purchases in foreign currencies, and even set up additional reporting currencies to view business results in different currencies.

If you work with multiple currencies in your environment, you may have experienced the challenge of manually keeping your currency exchange rates up-to-date. Updating the rates becomes even more difficult if you have multiple companies in your environment. Did you know that built into Microsoft Dynamics 365 Business Central, there is a way to update these rates automatically?

The Currency Exchange Rate Services functionality, part of Microsoft Dynamics 365 Business Central, allows you to fetch and update currency exchange rates from external services automatically. These services provide up-to-date exchange rates for different currencies, essential for businesses that trade in multiple currencies. By using Currency Exchange Rate Services, you can ensure that your currency exchange rates are accurate and reflect the current market conditions.

Business Central requires an exchange rate service that provides XML and JSON currency feeds. There are many services available; one of these services is FloatRates. FloatRates is a service that offers FREE XML and JSON Currency Feeds. (at the time of this writing)

To set up the FloatRates Currency Exchange Rate Service in Business Central, follow these steps:

  1. Search for Currency Exchange Rate Services using the Tell Me feature of Business Central.
  2. Open the Currency Exchange Rate Services Administration page. 
  3. Select the New action to create a new service.
  4. Fill in the necessary fields on the Currency Exchange Rate Service page.
  5. Enter the URL for your base currency in the Service URL field. In this example, we’re using USD with a feed of http://www.floatrates.com/daily/usd.xml. You can find your currency feed here.
  6. Map the data elements from the data feed to the desired currency fields in the field Mapping area of the page. You can enter data transformation rules and default values if necessary.
    Note: For the data source field, you can type or select the values by clicking the ellipsis button.
    Also note, at the time of this writing, I have experienced and heard of instances where the captions may not display correctly in Business Central 2023 Wave 2. The value mapping fields are still the same if you encounter this issue. 
  7. After completing the field mapping, You can Preview the mapping by selecting the Preview page action.
  8. Enable the service by toggling the “Enabled” option.

Once you have set up the Currency Exchange Rate Service, you can use the “Update Exchange Rates” action on the Currencies page in Business Central to fetch the latest currency exchange rates from the service provider. You may also use a Job Queue to schedule the currency update to automate the process.

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2023 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2023/12/microsoft-dynamics-365-business-central-keep-your-currency-exchange-rates-up-to-date-automatically/

Dynamics 365 Business Central 2023 Wave 2 – Get inlay hints in source editor for AL method parameters and return types

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2023 Wave 2 has several exciting Application features for runtime 12.0. One of the exciting features is to Get inlay hints in source editor for AL method parameters and return types.

Visual Studio Code supports inlay hints. Inlay hints allow languages to provide additional information about source code rendered inline. Inlay hints are usually used to show types of variables and function return types.

Hold on to your hats because I’ve got some exciting news for all you AL coding enthusiasts! Microsoft Dynamics 365 Business Central now supports Inlay hints for the AL Language. These hints provide a new level of information about source code rendered inline. You can now see variable types and function return types in the code – it’s like having a superpower! The new al.inlayhints settings determine the inlay hints you can see within your AL code. Enable the al.inlayhints.functionReturnTypes.enabled and al.inlayhints.parameterNames.enabled settings and see it yourself!

Without Inlay hints

With inlay hints

The inlayhints are further customized with the editor.inlayHints setting. You have control over when they’re enabled, the fontFamily, fontSze and if there is padding.

Read more about the feature Get inlay hints in source editor for AL method parameters and return types here.

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2023 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2023/11/dynamics-365-business-central-2023-wave-2-get-inlay-hints-in-source-editor-for-al-method-parameters-and-return-types/

Dynamics 365 Business Central 2023 Wave 2 – Set new output folder setting for storing app files at AL project build

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2023 Wave 2 has several exciting Application features for runtime 12.0. One of the exciting features is to Set new output folder setting for storing app files at AL project build.

Before Microsoft Dynamics 365 Business Central, 2023 Wave 2, when you built an AL project, the app file was stored in the project folder by default. A developer could set several folders for storing shared files, such as the “al.packagecache” folder for the downloaded symbols. If a developer wanted to save the app file to a folder outside of the project folder, they needed to move it external to the compiler.

The Business Central 2023 Wave 2 has a new feature in the “al.compilerOptions” settings. This feature allows developers to specify the “outFolder” property, which determines the output folder when generating an app file to build an AL project. This simplifies managing and reusing generated apps by storing them in a single location.

Read more about the feature Set new output folder setting for storing app files at AL project build here.

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2023 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2023/11/dynamics-365-business-central-2023-wave-2-set-new-output-folder-setting-for-storing-app-files-at-al-project-build/

November 2023 Cumulative Updates for Dynamics 365 Business Central

The November updates for Microsoft Dynamics 365 Business Central are now available.

Before applying the updates, you should confirm that your implementation is ready for the upgrade and ensure compatibility with your modifications. Work with a Microsoft Partner to determine if you are ready and what is needed for you to apply the update.

Please note that Online customers will automatically be upgraded to version 23.1 over the coming days/weeks and should receive an email notification when upgraded.

Direct links to the cumulative updates are listed here:

Dynamics 365 Business Central On-Premises 2023 Release Wave 2 – 23.1 (November 2023)

Dynamics 365 Business Central On-Premises 2023 Release Wave 1 Updates – 22.7 (November 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 2 Updates – Update 21.13 (November 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.18 (October 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 2 Updates – Update 19.18 (April 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.18 (October 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 2 Updates – Update 17.17 (April 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 1 Updates – Update 16.19 (January 2022)

Dynamics 365 Business Central On-Premises 2019 Release Wave 2 Updates – Update 15.17 (April 2021)

Dynamics 365 Business Central On-Premises Spring 2019 Updates – Update 52 (October 2023)

Dynamics 365 Business Central On-Premises October’18 Updates – Update 18 (April 2020)

Microsoft Dynamics NAV 2018 – Update 60 (January 2023)

Microsoft Dynamics NAV 2017 – Update Update 61 (January 2022)

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Permanent link to this article: https://www.dvlprlife.com/2023/11/november-2023-cumulative-updates-for-dynamics-365-business-central/

Dynamics 365 Business Central 2023 Wave 2 – Provide queries for users to do ad hoc data analysis

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2023 Wave 2 has several exciting Application features for runtime 12.0. One of the exciting features is to Dynamics 365 Business Central 2023 Wave 2 – Provide queries for users to do ad hoc data analysis.

In the realm of AL development for Microsoft Dynamics 365 Business Central, Query objects are a pivotal tool for extracting and amalgamating records from multiple tables, thereby structuring the data into a unified dataset composed of rows and columns, akin to the functionality provided by an SQL query. There are two types of Query objects: ‘normal’ and ‘API’. Additionally, Queries can execute computational operations on the data, such as sums or averages within a specific dataset column. Moreover, the utilization of Query objects offers a notable enhancement in terms of performance efficiency, particularly in data reading and processing operations.

Before Microsoft Dynamics 365 Business Central 2023 Wave 2, if a developer wanted to display the results of a query on a page, they had to open the Query, loop through the records, and add them to a page with a temporary source.

page 50100 "DVLPR Customer Overview"
{
    ApplicationArea = All;
    Caption = 'Top Customer Overview';
    DeleteAllowed = false;
    InsertAllowed = false;
    ModifyAllowed = false;
    PageType = List;
    SourceTable = "DVLPR Top Customer Overview";
    SourceTableTemporary = true;
    UsageCategory = Lists;

    layout
    {
        area(content)
        {
            repeater(General)
            {
                field("No."; Rec."No.")
                {
                    ToolTip = 'Specifies the value of the No. field.';
                }
                field(Name; Rec.Name)
                {
                    ToolTip = 'Specifies the value of the Name field.';
                }
                field(City; Rec.City)
                {
                    ToolTip = 'Specifies the value of the City field.';
                }
                field("Country/Region Code"; Rec."Country/Region Code")
                {
                    ToolTip = 'Specifies the value of the Country/Region Code field.';
                }
                field("Country/Region Name"; Rec."Country/Region Name")
                {
                    ToolTip = 'Specifies the value of the Country/Region Name field.';
                }
                field("Profit (LCY)"; Rec."Profit (LCY)")
                {
                    ToolTip = 'Specifies the value of the Profit (LCY) field.';
                }
                field("Sales (LCY)"; Rec."Sales (LCY)")
                {
                    ToolTip = 'Specifies the value of the Sales (LCY) field.';
                }
                field("Sales Person Name"; Rec."Sales Person Name")
                {
                    ToolTip = 'Specifies the value of the Sales Person Name field.';
                }
            }
        }
    }

    trigger OnOpenPage()
    var
        TopCustomerOverviewQuery: Query "DVLPR Top Customer Overview";
    begin
        TopCustomerOverviewQuery.Open();
        while TopCustomerOverviewQuery.Read() do begin
            Rec.Init();
            Rec."No." := TopCustomerOverviewQuery.No;
            Rec.Name := TopCustomerOverviewQuery.Name;
            Rec.City := TopCustomerOverviewQuery.City;
            Rec."Sales (LCY)" := TopCustomerOverviewQuery.Sales_LCY;
            Rec."Profit (LCY)" := TopCustomerOverviewQuery.Profit_LCY;
            Rec."Salesperson Code" := TopCustomerOverviewQuery.Salesperson_Code;
            Rec."Sales Person Name" := TopCustomerOverviewQuery.SalesPersonName;
            Rec.Insert;
        end;
    end;
}

Now – a developer can display the Query by running the object directly. Wait, there is a bonus – not only does the Query display, but it is in the new Analysis Mode.

pageextension 50100 "DVLPR Customer List Ext" extends "Customer List"
{
    actions
    {
        addlast("&Customer")
        {
            action("DVLPR Top Customers Query")
            {
                ApplicationArea = All;
                Caption = 'Top Customers Query';
                Image = Sales;
                RunObject = query "DVLPR Top Customer Overview";
                Tooltip = 'Open the top customer query.';
            }          
        }
    }
}

Read more about the feature Provide queries for users to do ad hoc data analysis across tables here.

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2023 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2023/11/dynamics-365-business-central-2023-wave-2-provide-queries-for-users-to-do-ad-hoc-data-analysis/

October 2023 Cumulative Updates for Dynamics 365 Business Central

The October updates for Microsoft Dynamics 365 Business Central are now available.

Before applying the updates, you should confirm that your implementation is ready for the upgrade and ensure compatibility with your modifications. Work with a Microsoft Partner to determine if you are ready and what is needed for you to apply the update.

Please note that Online customers will automatically be upgraded to version 23.0 over the coming days/weeks and should receive an email notification when upgraded.

Direct links to the cumulative updates are listed here:

Dynamics 365 Business Central On-Premises 2023 Release Wave 2 – 23.0 (October 2023)

Dynamics 365 Business Central On-Premises 2023 Release Wave 1 Updates – 22.6 (October 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 2 Updates – Update 21.12 (October 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.18 (October 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 2 Updates – Update 19.18 (April 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.18 (October 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 2 Updates – Update 17.17 (April 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 1 Updates – Update 16.19 (January 2022)

Dynamics 365 Business Central On-Premises 2019 Release Wave 2 Updates – Update 15.17 (April 2021)

Dynamics 365 Business Central On-Premises Spring 2019 Updates – Update 52 (October 2023)

Dynamics 365 Business Central On-Premises October’18 Updates – Update 18 (April 2020)

Microsoft Dynamics NAV 2018 – Update 60 (January 2023)

Microsoft Dynamics NAV 2017 – Update Update 61 (January 2022)

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Permanent link to this article: https://www.dvlprlife.com/2023/10/october-2023-cumulative-updates-for-dynamics-365-business-central/

September 2023 Cumulative Updates for Dynamics 365 Business Central

The September updates for Microsoft Dynamics 365 Business Central are now available.

Before applying the updates, you should confirm that your implementation is ready for the upgrade and ensure compatibility with your modifications. Work with a Microsoft Partner to determine if you are ready and what is needed for you to apply the update.

Please note that Online customers will automatically be upgraded to version 22.5 over the coming days/weeks and should receive an email notification when upgraded.

Direct links to the cumulative updates are listed here:

Dynamics 365 Business Central On-Premises 2023 Release Wave 1 Updates – 22.5 (September 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 2 Updates – Update 21.11 (September 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.17 (September 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 2 Updates – Update 19.18 (April 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.18 (October 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 2 Updates – Update 17.17 (April 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 1 Updates – Update 16.19 (January 2022)

Dynamics 365 Business Central On-Premises 2019 Release Wave 2 Updates – Update 15.17 (April 2021)

Dynamics 365 Business Central On-Premises Spring 2019 Updates – Update 51 (September 2023)

Dynamics 365 Business Central On-Premises October’18 Updates – Update 18 (April 2020)

Microsoft Dynamics NAV 2018 – Update 60 (January 2023)

Microsoft Dynamics NAV 2017 – Update Update 61 (January 2022)

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Permanent link to this article: https://www.dvlprlife.com/2023/09/september-2023-cumulative-updates-for-dynamics-365-business-central/

August 2023 Cumulative Updates for Dynamics 365 Business Central

The August updates for Microsoft Dynamics 365 Business Central are now available.

Before applying the updates, you should confirm that your implementation is ready for the upgrade and ensure compatibility with your modifications. Work with a Microsoft Partner to determine if you are ready and what is needed for you to apply the update.

Please note that Online customers will automatically be upgraded to version 22.4 over the coming days/weeks and should receive an email notification when upgraded.

Direct links to the cumulative updates are listed here:

Dynamics 365 Business Central On-Premises 2023 Release Wave 1 Updates – 22.4 (August 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 2 Updates – Update 21.10 (August 2023)

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.16 (August 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 2 Updates – Update 19.18 (April 2023)

Dynamics 365 Business Central On-Premises 2021 Release Wave 1 Updates – Update 18.18 (October 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 2 Updates – Update 17.17 (April 2022)

Dynamics 365 Business Central On-Premises 2020 Release Wave 1 Updates – Update 16.19 (January 2022)

Dynamics 365 Business Central On-Premises 2019 Release Wave 2 Updates – Update 15.17 (April 2021)

Dynamics 365 Business Central On-Premises Spring 2019 Updates – Update 50 (August 2023)

Dynamics 365 Business Central On-Premises October’18 Updates – Update 18 (April 2020)

Microsoft Dynamics NAV 2018 – Update 60 (January 2023)

Microsoft Dynamics NAV 2017 – Update Update 61 (January 2022)

Microsoft Dynamics NAV 2016 – Update 67 (July 2021)

Permanent link to this article: https://www.dvlprlife.com/2023/08/august-2023-cumulative-updates-for-dynamics-365-business-central/

Microsoft Dynamics 365 Business Central – Sorting Algorithms: Bubble, Merge, and Quick

The other day I felt my computer files were a little disorganized, so I went through some old files to do some hard-core cleanup. I wanted to purge and archive old programs, documents, and repos. While reviewing the files, I found some old C# code (from the days of when I tried to stay sharp through CodeWars), I wrote to test different sorting algorithms. Sorting algorithms are used to organize data in a specific order, and in my code, there was the good ole Bubble Sort, the Merge Sort, and their friend, the Quick Sort.

There are several options when sorting data, and depending on the data set, some are better than others. Once I came across the sorting code, For no other reason than wanting to, I strayed from my task and converted them to AL for Microsoft Dynamics 365 Business Central.

Bubble Sort

One such sorting algorithm is called Bubble Sort. It’s a basic comparison-based method that gets its name from how smaller or larger elements “bubble” to the top of the list. With a Bubble Sort, start at the beginning of the list and compare the first element to the second. If the first element is greater than the second, swap their positions. If not, leave them as they are. Move one position to the right and compare the second and third elements. Continue this process for each pair of adjacent numbers until the end of the list is reached. It’s important to note that Bubble Sort is not very efficient, especially for large lists.

    procedure BubbleSort(List: List of [Integer])
    var
        i, j : Integer;
        ListItem: Integer;
    begin
        for i := 1 to List.Count do begin
            for j := 1 to List.Count - 1 do begin
                if List.Get(i) < List.Get(j) then begin
                    ListItem := List.Get(i);
                    List.Set(i, List.Get(j));
                    List.Set(j, ListItem);
                end;
            end;
        end;
    end;

Merge Sort

Another option, if you need to sort data, is Merge Sort. This type of comparison-based sorting algorithm is effective for most practical data sets, especially on larger lists. The strategy is to divide and conquer. The data set is split in half continuously until each set contains only one element, which is considered a sorted list. Then, the adjacent lists are merged back together while maintaining sorted order. This is done by comparing the first elements of each list and adding the smaller one to the new list, then moving on to the next element in the list from which the element was taken. The process is repeated until all the elements have been merged back into a single sorted list. Compared to Bubble Sort, Merge Sort is more efficient.

    procedure MergeSort(List: List of [Integer])
    begin
        MergeSort(List, 1, List.Count);
    end;

    local procedure Merge(List: List of [Integer]; Left: Integer; Middle: Integer; Right: Integer)
    var
        i, j, k : Integer;
        LeftList: List of [Integer];
        RightList: List of [Integer];
    begin
        for i := Left to Middle do begin
            LeftList.Add(List.Get(i));
        end;
        for i := Middle + 1 to Right do begin
            RightList.Add(List.Get(i));
        end;

        i := 1;
        j := 1;
        k := Left;

        while (i <= LeftList.Count) and (j <= RightList.Count) do begin
            if LeftList.Get(i) <= RightList.Get(j) then begin
                List.Set(k, LeftList.Get(i));
                i := i + 1;
            end else begin
                List.Set(k, RightList.Get(j));
                j := j + 1;
            end;
            k := k + 1;
        end;

        while i <= LeftList.Count do begin
            List.Set(k, LeftList.Get(i));
            i := i + 1;
            k := k + 1;
        end;

        while j <= RightList.Count do begin
            List.Set(k, RightList.Get(j));
            j := j + 1;
            k := k + 1;
        end;
    end;

    local procedure MergeSort(List: List of [Integer]; Left: Integer; Right: Integer)
    var
        Middle: Integer;
    begin
        if Left < Right then begin
            Middle := (Left + Right) div 2;
            MergeSort(List, Left, Middle);
            MergeSort(List, Middle + 1, Right);
            Merge(List, Left, Middle, Right);
        end;
    end;

Quick Sort

Quicksort is another efficient and commonly used sorting algorithm that uses a divide-and-conquer approach. It’s widely used due to its efficiency and ease of implementation. The first step in the Quicksort algorithm is to choose a pivot. The pivot can be any element from the array, but one commonly chooses the first, last, or middle elements. The role of the pivot is to assist in splitting the array. Next, rearrange the array elements so that all elements less than or equal to the pivot come before (to the left of) the pivot and all elements greater than the pivot come after (to the right of) the pivot. At this point, the pivot is in its final position in the sorted array.

    procedure QuickSort(List: List of [Integer])
    var
        i: Integer;
    begin
        QuickSort(List, 1, List.Count);
    end;

    local procedure Partition(List: List of [Integer]; Left: Integer; Right: Integer): Integer
    var
        i, j : Integer;
        Pivot: Integer;
    begin
        Pivot := List.Get(Right);
        i := Left - 1;
        for j := Left to Right - 1 do begin
            if List.Get(j) <= Pivot then begin
                i := i + 1;
                Swap(List, i, j);
            end;
        end;
        Swap(List, i + 1, Right);
        exit(i + 1);
    end;

    local procedure QuickSort(List: List of [Integer]; Left: Integer; Right: Integer)
    var
        Pivot: Integer;
    begin
        if Left < Right then begin
            Pivot := Partition(List, Left, Right);
            QuickSort(List, Left, Pivot - 1);
            QuickSort(List, Pivot + 1, Right);
        end;
    end;

    local procedure Swap(List: List of [Integer]; i: Integer; j: Integer)
    var
        ListItem: Integer;
    begin
        ListItem := List.Get(i);
        List.Set(i, List.Get(j));
        List.Set(j, ListItem);

    end;

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2023 Wave 1 online.

Permanent link to this article: https://www.dvlprlife.com/2023/07/microsoft-dynamics-365-business-central-sorting-algorithms-bubble-merge-and-quick/