July 2023 Cumulative Updates for Dynamics 365 Business Central

The July 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.3 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.3 (July 2023)

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

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.15 (July 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 49 (July 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/07/july-2023-cumulative-updates-for-dynamics-365-business-central/

June 2023 Cumulative Updates for Dynamics 365 Business Central

The June 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.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 1 Updates – 22.2 (June 2023)

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

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.14 (June 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 48 (June 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/06/june-2023-cumulative-updates-for-dynamics-365-business-central/

Microsoft Dynamics 365 Business Central – Saved Views and a DateFormula

With Microsoft Dynamics 365 Business Central, users can create and save personalized views of data in different lists and pages through the Saved Views feature. Saved Views allows users to filter, sort, and organize the data in a way that is relevant to their needs. By using Saved Views, users can improve their efficiency, productivity and gain insights by focusing on the data that is important to them.

To create a Saved View in Business Central:

  1. Navigate to the List Page where you would like a  Saved View.
  2. Show the Filter Pane by clicking the Show Filter Pane Icon on the action ribbon.
  3. Sort the columns to the desired View
  4. Enter the filter that you’d like saved with the View
  5. Click the Save As icon in the Filter Pane and enter a name for the Saved View
  6. Enter a name for your View
  7. The Saved View is now available on the Filter Pane

To edit a Saved View in Business Central:

  1. Navigate to the List Page where you have a  Saved View.
  2. Show the Filter Pane by clicking the Show Filter Pane Icon on the action ribbon.
  3. Select the saved View that you would like to edit
  4. Select the Edit action in the Filter Pane
  5. Adjust the filters and sort for the View
  6. Select the save icon adjacent to the Saved View’s name

Many list pages contain flowfields that use Date Filters. The filters used in Date Filters are also saved when creating a Saved View. One nicety to the filters is that instead of using a fixed date, you can enter a DateFormula. For example, If you’d like the FlowFields to calculate through last week, you can enter the formula “..CW-1W”.

You can see the calculated value when you look at the filter on the Filter Pane. However, if you make changes to it, the DateFormula will be shown and can be adjusted. Whenever the Saved View is chosen, the FlowFields will be updated with the new date calculated by the formula.

Learn more about DateFormulas 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 1 online.

Permanent link to this article: https://www.dvlprlife.com/2023/06/microsoft-dynamics-365-business-central-saved-views-and-a-dateformula/

Microsoft Dynamics 365 Business Central – Split Delimited Value in AL

In the AL language for Microsoft Dynamics 365 Business Central, the List Data Type represents a strongly typed list of ordered objects accessible by index. Lists are unbounded, meaning their dimension (size) is not specified when declared.

A List can only be declared with simple types (Byte, Boolean, Char, Code, Date, DateFormula, DateTime, Decimal, Text, Time, etc.) and does not support holding instantiated records.

Lists are an efficient way to create and manage unbounded data structures with many practical uses.

Only a few days pass when I do not find a reason to use lists. One of my recent uses for a List was to store and process each unique value found in a delimited text value. For this, I split the delimited text into separate values and then copied them to a new list removing duplicates.

In this example, a value delimited by a comma (‘,’) or pipe (‘|’) is split into a list of unique values.

    procedure SplitValues()
    var
        UniqueValues: List of [Text];
        DelimitedText: Text;
        value: Text;
    begin
        DelimitedText := '12,34,56,24|12,56,89,56,23|12,34,22,34';
        UniqueValues := SplitUniqueValues(DelimitedText);

        foreach value in UniqueValues do
            Message(value);
    end;

    local procedure SplitUniqueValues(DelimitedText: Text): List of [Text]
    var
        UniqueValues: List of [Text];
        Values: List of [Text];
        Delimiters: Text;
        value: Text;
    begin
        Delimiters := ', |';
        Values := DelimitedText.Split(Delimiters.Split(' '));
        foreach value in Values do
            if not UniqueValues.Contains(value) then
                UniqueValues.Add(value);

        exit(UniqueValues);
    end;

Learn more about the List Data Type 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 1 online.

Permanent link to this article: https://www.dvlprlife.com/2023/06/microsoft-dynamics-365-business-central-split-delimited-value-in-al/

Microsoft Dynamics 365 Business Central – Recurring Purchase Lines

Businesses often order the same products and/or services from a supplier. In the many years I have been implementing Microsoft Dynamics 365 Business Central, I have frequently been asked how to add default purchase lines (often as a default G/L Account modification) to purchase documents for a vendor. Fortunately, this feature is accessible through Business Central.

Recurring Purchase Lines are useful for businesses with regular purchase documents of the same items or services from certain suppliers. By setting up recurring purchase lines, a company can automate creating these documents with predefined purchase lines, saving time and reducing the chance of errors.

To create Recurring Purchase Lines:

1. Search for recurring purchase lines using the Search of Business Central.

2. Select the Recurring Purchase Line Administration Page

3. Select the New page action (or Manage to modify or view an existing Recurring Purchase Line)

4. On the Standard Purchase Code Card, enter a code and description to reference the Recurring Purchase Line(s)

5. In the Lines group of the card, enter the lines and desired values to include for purchase documents created for an assigned vendor.

6. Enter the Line Type – you can enter Comment, G/L Account, Item, Resource, Fixed Asset, or Item (Charge) lines.

7. Enter the appropriate No. of for the line.

8. Enter a description,

9. Enter a default quantity.

10. The Amount, Variant, and Unit of Measure fields are unavailable by default; if you’d like to enter any of these values, you must personalize the page and add them.

With the Standard Purchase Codes created, they are ready to be assigned to vendors.

  1. Search for Vendors using the search feature of Microsoft Dynamics 365 Business Central.
  2. Open the Vendor List Page and navigate to the Vendor you’d like to assign Recurring Purchase Lines.
  3. Select the Related->Purchases->Recurring Purchase Lines action from the menu.
  4. Select the desired purchase code on the Vendor’s Recurring Purchase Lines List Page and specify how you want to use standard purchase codes on purchase quotes, orders, invoices, and credit memos.
    • Manual – The user can use the Get Recurring Purchase Lines action from the functions menu on the document.
    • Automatic – the Standard Purchase Code lines are added to a new purchase document. 
    • Always Ask – the user will be alerted that recurring purchase lines exist and asked to select the lines they’d like to include (if applicable)

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/06/microsoft-dynamics-365-business-central-recurring-purchase-lines/

Microsoft Dynamics 365 Business Central – Base64 Encoding and Decoding

Base64 is a group of binary-to-text encoding schemes representing binary data in an ASCII string format. Base64 data encoding is designed to survive transport through transport layers that are not 8-bit clean, such as mail bodies. Encoding the binary data to ASCII text helps ensure that the data remains intact without loss or modification during transport.

The most common use case for base64 encoding is when binary data must be sent over text-based systems, such as email, HTTP, or complex data stored in XML or JSON.

The principle behind Base64 encoding takes 3 bytes of binary data and represents them as 4 ASCII characters. This increases the size of the data by 33%, which is a significant drawback, but sometimes this is acceptable given the benefits.

Base64 Encoding and Decoding with AL for Business Central via codeunit 4110 “Base64 Convert”. The “Base64 Convert” codeunit has many overload methods to convert text to and from its base-64 representation.

page 50100 "Base64 Encoding"
{
    ApplicationArea = All;
    Caption = 'Base64 Encoding';
    PageType = Card;

    layout
    {
        area(content)
        {
            group(General)
            {
                Caption = 'General';
                grid(Columns)
                {
                    ShowCaption = false;
                    group(text)
                    {
                        ShowCaption = false;
                        field(FromText; FromText)
                        {
                            ApplicationArea = All;
                            Caption = 'From Text';
                            Editable = true;
                            MultiLine = true;
                        }
                        field(ToText; ToText)
                        {
                            ApplicationArea = All;
                            Caption = 'To Text';
                            Editable = false;
                            MultiLine = true;
                        }
                    }
                }
            }
        }
    }
    actions
    {
        area(Promoted)
        {
            actionref(Encoderef; Encode)
            {
            }
            actionref(Dencoderef; Decode)
            {
            }
        }
        area(Processing)
        {
            action(Encode)
            {
                ApplicationArea = All;
                Caption = 'Encode';
                Image = EncryptionKeys;

                trigger OnAction()
                begin
                    ToText := Base64Convert.ToBase64(FromText);
                end;


            }
            action(Decode)
            {
                ApplicationArea = All;
                Caption = 'Decode';
                Image = Text;

                trigger OnAction()
                begin
                    ToText := Base64Convert.FromBase64(FromText);
                end;
            }
        }
    }

    var
        FromText: Text;
        ToText: Text;
        Base64Convert: Codeunit "Base64 Convert";
}

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/05/microsoft-dynamics-365-business-central-base64-encoding-and-decoding/

May 2023 Cumulative Updates for Dynamics 365 Business Central and Microsoft Dynamics NAV

The May updates for Microsoft Dynamics NAV and 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.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 1 Updates – 22.1 (May 2023)

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

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates – Update 20.13 (May 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 47 (May 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/05/may-2023-cumulative-updates-for-dynamics-365-business-central-and-microsoft-dynamics-nav/

Real Things I’m Asked – Microsoft Dynamics 365 Business Central Copy Document

I am asked many questions about Business Central on any given day. The questions vary and cover various topics, from development to administration to integration to general application use, to name a few. I want to post them all, but that is not feasible; From time to time, I pick one to write about.

Q. In Microsoft Dynamics 365 Business Central, is there a way to copy a sales document to create a new one?

A. In Microsoft Dynamics 365 Business Central, the “Copy Document” functionality allows users to create new sales or purchase documents based on existing ones. This feature can save time and effort when you need to create similar documents, such as sales orders, quotes, purchase orders, or invoices.

To use the “Copy Document” functionality in Business Central, follow these steps:

  1. Open the list page for the type of document you want to create, such as the Sales Orders or Purchase Orders list.
  2. Click on “New” to create a new document, which will be the destination document for the “Copy Document” action.
  3. Click on the “Actions” tab in the top menu in the new document.
  4. Under the “Actions” tab, click on “Functions,” and then select “Copy Document.”
  5. On the “Copy Document” request page, enter the source “Document Type” and “No.” for the document that you would like to copy from.
  6. Toggle the “Include Header” switch to indicate if the source document header should replace the destination document’s header information.
  7. Toggle the “Recalculate Lines” switch to indicate if the copied document line values are recalculated when inserted into the destination document.
  8. Modify the new document as needed.

Note that the availability and behavior of the “Copy Document” functionality might vary depending on your Business Central version, customization, or extensions.

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/05/real-things-im-asked-microsoft-dynamics-365-business-central-copy-document/

Microsoft Dynamics 365 Business Central – AL Region Directive

In the AL programming language, region directives are used to organize code to a specific region or section of code. Regions can help developers keep track of and manage the code for different parts of an application. The Region Directives also mark a block of code that you can expand or collapse, which is helpful with readability or focusing on sections of code.

codeunit 50101 "DVLPR Region Directive"
{
    #region Return Letters
    procedure ReturnA(): Char
    begin
        exit('A');
    end;

    procedure ReturnB(): Char
    begin
        exit('B');
    end;

    procedure ReturnC(): Char
    begin
        exit('C');
    end;
    #endregion

    #region Return Numbers
    procedure Return1(): Integer
    begin
        exit(1);
    end;

    procedure Return2(): Integer
    begin
        exit(2);
    end;

    procedure Return3(): Integer
    begin
        exit(3);
    end;
    #endregion
}

A region block is marked with the #region directive and is closed with the #endregion directive.

Note: The code and information discussed in this article is 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/04/microsoft-dynamics-365-business-central-al-region-directive/

Microsoft Dynamics 365 Business Central – AL Conditional Preprocessor Directives

In the AL programming language, preprocessor directives are used to make code conditional, suppress warnings, and enable code expansion and collapse. The AL preprocessor directives are grouped into conditional, regions, and pragmas categories. In this article, I’ll highlight Conditional Preprocessor Directives.

Conditional preprocessor directives are a feature in AL that allows developers to include or exclude parts of the code based on certain conditions. These directives are evaluated at compile-time and help manage different configurations or enable and disable certain features.

A conditional directive checks the value of a symbol to determine if code is included in the compilation. Symbols may be defined at the beginning of a source file to set the Symbol for the scope of that file, or they can be defined in the app.json file for global scope within the extension.

Symbols are defined globally with the preprocessorSymbols setting in the extensions App.json file.

Symbols are defined with the scope of a file with the #define directive at the beginning of a source file. Symbols may also be undefined with the #undef directive, which is useful in the case of a global directive that should not be applied to a specific file.

Conditional preprocessor directives in AL for Microsoft Dynamics 365 Business Central may also use the Logical Operators “AND” and “OR,” allowing developers to include or exclude code based on multiple preprocessor symbols within one conditional directive. (Thank you for the comment, navfreak.com)

#define SYMBOL2
#define SYMBOL3
codeunit 50102 "DVLPR My Stuff"
{
    procedure CompilerDirective()
    var
        MessageTxt: Text;
    begin
#if SYMBOL1 or SYMBOL2        // Code to include if Symbol1 or Symbol2 is defined
        MessageTxt += 'Symbol1 or Symbol2\';
#endif

#if SYMBOL2 and SYMBOL3      // Code to include if Symbol2 and Symbol3 are defined
        MessageTxt += 'Symbol2 and Symbol3';
#endif

        Message(MessageTxt);
    end;


Using Conditional Preprocessor Directives is considered Best Practices for Deprecation of AL Code.

Read more about the feature Conditional directives here.

Note: The code and information discussed in this article is 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/04/microsoft-dynamics-365-business-central-al-conditional-preprocessor-directives/