Docs: What’s new in BC 24 for developers

Business Central 24 (aka Business Central 2024 release wave 1) is going to be released in the beginning of April 2024, and the docs were updated already now. These are the relevant resources for AL developers:

This blog post will summarize what technical docs content has been added specifically for BC 24 / in AL 13.0. It will be updated as soon as further content is added to the docs.

  1. Deprecated features in BC 24
    1. Application
    2. Platform
  2. Feature Management
    1. Features becoming generally available
    2. Mandatory features
  3. New Business Foundation app
  4. Debuggable System Application app
  5. New barcode scanning control add-in
  6. New Cookie data type
  7. New FileUpload data type and Drag & Drop
  8. Tooltips on table fields
  9. Other new AL methods
  10. Deprecated methods
  11. From the AL Language changelog
  12. Page scripting tool (preview)
  13. Rules for compiler or code analyzer
    1. New AL diagnostics (ALxxxx)
    2. AL Warnings turned into errors
    3. Removed AL diagnostics (ALxxxx)
    4. New code analyzer rules
      1. AppSourceCop (ASxxxx)
      2. CodeCop (AAxxxx)
      3. UICop (AWxxxx)
      4. PerTentantExtensionCop (PTExxxx)
  14. On-Premises

Deprecated features in BC 24

Application

The following features are marked as obsolete:pending.

As per System and Base Application Reference:

As per Deprecated Features in the Base App:

Platform

As per Deprecated platform features:

Feature Management

Overview page: Optional features that are now mandatory

Features becoming generally available

These features are optional for a while:

Mandatory features

These features are now mandatory and can no longer be disabled:

New Business Foundation app

The No. Series management has been moved from the Base Application app to the new Business Foundation app.

Further modules will move to the Business Fondation app in the future (source, access restricted): Address, Attachment, AuditCodes, BatchProcessing, Calendar, Comment, Company, Enums, ExtendedText, Navigate, PaymentTerms, Period, Reporting, Shipping, Task, UOM.

Debuggable System Application app

Related feature: Debug the System application.

New barcode scanning control add-in

A new CameraBarcodeScannerProviderAddIn controladdin has been added.
Related feature: Use AL-controlled barcode scanning for all scenarios.
Related docs article: Adding barcode scanning to the mobile app.

Related docs article: Call external services with the HttpClient data type.

The Cookie Data Type allows you to efficiently work with HTTP cookies. You can use the Cookie data type to send and receive cookies while sending HTTP requests, using the following methods:

Added an AL interface to handle cookies in HttpResponseMessage and HttpRequestMessage data types:

Added AL interface to enable UseResponseCookies in HttpClient:

New FileUpload data type and Drag & Drop

Striked through = content for BC 25 / runtime 14.0 that was published too early.

Related docs article (caution, the code sample is not working yet): Add drop zones for uploading multiple files.

New related features:

The new FileUpload Data Type represents a file. We can use it as list. Methods:

Using the new fileuploadaction control on pages (called a File Upload action), a “Select files” dialog is shown. Related properties (example code):

Trigger

Tooltips on table fields

Introduced the tooltip property on table fields, which like the caption will be applied on page controls that reference the table field. 

Other new AL methods

  • Database.AlterKey(KeyRef, Boolean) Method – Alter a table’s key in SQL, either disabling or enabling it. Any alteration only pertains to the current transaction and will be reverted at the end of the current transaction. The method is first supported only in Business Central on-premises, but this will be changed in a later BC version.

IsolatedStorage: New method overloads for use with the SecretText type
Related feature: Debug the System application.

NumberSequence
Related feature: Write flexible and performant code with NumberSequences.

Deprecated methods

Marked Dialog.LogInternalError as deprecated: “Consider using ‘Session.LogMessage’ instead.”

From the AL Language changelog

Source: AL Language changelog

  • Support for multiple extensions to same target and extensions and target in same app
    Related feature: Define extension objects in same app as their base object.
  • Changes to AL Table Proxy Generator tool (altpgen)
  • Script/Css/Image paths on control add-ins can be relative to the control add-in source file.
  • New “Create AL Project” button
  • AlDoc supports overwrite files
  • Support ended for debugging Business Central server versions less than 20
  • Added support for translating page list views using translation files.
  • Added support for having lists of In- or OutStreams.
  • Added configuration flag al.semanticFolding.enabled, in the settings.json file, for controlling if the extension should provide the folding ranges, or if the strategy from Visual Studio Code should be used.
  • Added code actions to fix all AL0606 (‘with’ statement) warnings in the document, project, or workspace scope.
  • Added support for passing an integer parameter to a method that has one overload with an Option and another overload with an Enum parameter. This call used to be ambiguous, but the method with the Option parameter will now be selected.
  • Folding usings
    It’s now possible to use the "editor.foldingImportsByDefault" setting. When set to true it collapses all of the using statements when a file is opened.
  • Placeholder text on Page Fields
    Page fields can now leverage the InstructionalText and InstructionalTextML properties to define placeholders. These values will be showed when the field would otherwise be empty. See also Pages overview.
  • Prompt Guides
    PromptDialog pages now support defining a prompt guide, which contains a list of pre-defined text prompts. This allows users to easily select a prompt guide to use as input to generate content, rather than creating their own prompt from scratch. 
    Related docs article: Prompting using a prompt guide.
  • Copilot prompt actions
    Introduced the Copilot prompt actions to promote AI capabilities of a Business Central solution. These will be rendered in a floting action bar in your pages that nudges users to use relevant Copilot features. Related docs articles: Prompting using a floating action bar, Build Copilot user experience.

Page scripting tool (preview)

he page scripting tool in the Business Central web client lets you record your interactions with the user interface (UI), such as opening pages, selecting actions, filling in fields, and so on. You can then replay the recording to automatically replicate the exact same actions in the UI that were done during recording. As the recording is replayed, you receive real-time status feedback on whether an action succeeds or fails.

Related docs article: Use page scripting tool for acceptance testing (preview)

Rules for compiler or code analyzer

Addes support for suppressing the diagnostics diagnostics AL0254AL0659AA0074AA0100AA0470 and AA0218 per instance, per document, per project, or per workspace.

New AL diagnostics (ALxxxx)

As often, there are so many new rules, that I summarize them with the following screenshots taken from the AL Compiler Diagnostics page instead, please click or tap to enlarge:

  • Error AL1082 – The manifest property ‘{0}’ is only available for Target ‘{1}’.
  • Warning AL0603 – An implicit conversion is being performed from a value of type ‘{0}’ to a value of type ‘{1}’. This conversion can lead to unexpected runtime issues.
  • Information AL0678 – The name of {0} ‘{1}’ conflicts with {0} ‘{2}’ defined in {3} ‘{4}’ by the extension ‘{5}’. Choose another name for one of them. Otherwise, this might cause runtime issues.
  • Added warning AL0803 when the names of two events or event subscribers conflict within the same object. Whitespaces in names are internally replaced with an underscore during compilation, such that two different names can collide. For example, “my event” and “my_event” are conflicting names. From runtime 15.0, an error will be reported with AL0757.

AL Warnings turned into errors

Source: Warnings Turning into Errors Overview

  • AL0700 – Dependency ‘{0}’ must be referenced in the property ‘{1}’ rather than as an explicit dependency.
  • AL0702 – Dependency ‘{0}’ is referenced in the property ‘{1}’ and as an explicit dependency. Remove the explicit dependency.
  • AL0751 – Enum values can’t be nested. Use ‘{0}’ instead.
  • AL0753 – The name of a dataitem cannot be empty because it can cause runtime errors.
  • AL0758 – The name of {0} ‘{1}’ conflicts with {0} ‘{2}’ defined in {3} ‘{4}’ by the extension ‘{5}’. Choose another name for one of them. Otherwise, this might cause runtime issues.
  • AL0782 – A page extension is only allowed to access control add-ins defined within its own extension scope.

Removed AL diagnostics (ALxxxx)

  • Error AL0249 – The Page ‘{0}’ is not found. Previously reported on missing page parts, now removed in favor of AL0185 for missing application objects because the message for AL0249 was never formatted correctly.
  • Error AL0266 – Pages of types ‘CardPart’ and ‘ListPart’ can only contain Processing areas.
  • Error AL0770 – The identifier ‘{0}’ cannot have any leading or trailing spaces.

New code analyzer rules

AppSourceCop (ASxxxx)

  • Info AS0125 – Changes the XLIFF translation ID are not allowed.
  • Warning AS0126 – InternalsVisibleTo should not specifying a different publisher name than the one of this extension.

Changes as per AL Language changelog:

  • Added rule AS0124 for detecting breaking changes when changing the target of an extension object. The rule currently only validates page extensions and page customizations, because other extension objects do not support the ObsoleteState properties and cannot be deprecated.
  • Updated rule AS0105 to allow references to obsolete table, table fields, and table keys in upgrade codeunits.
  • Updated diagnostic message and description of rule AS0080 to not mention primary key fields validation anymore, because the primary key fields validation is performed by rule AS0118.
  • Refactoring of breaking change validation rules to support multiple extension objects for the same target and extension objects and target in same app.
  • Updated rule AS0098 to also check affixes for keys on table extension fields.

CodeCop (AAxxxx)

  • Disabled info AA0072 by default. In order to enable it, you must now include it in a ruleset, see Ruleset for the code analysis tool.
  • Warning AA0234 – You must write a tooltip in the Tooltip property for all fields on table objects.
  • Fixed diagnostic AA0228 to handle methods with quotes in their name. Previously, methods with quotes in their name would always be reported as unused.

UICop (AWxxxx)

  • No changes

PerTentantExtensionCop (PTExxxx)

  • Warning PTE0022 – The member ID should be within the allowed range.
  • Info PTE0023 – The enum ordinal value should be within the allowed range.

On-Premises

BC 24.0 on-premises is available since Friday April 5th 2024 (download it here).

The following docs articles are relevant for BC on-premises only:

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started