New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 2: Use the Ternary Operator when Coding in the AL Language

Microsoft Dynamics 365 Business CentralThis post is part of the New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 2 series in which I am taking a look at the new functionality introduced in Microsoft Dynamics 365 Business Central 2024 Wave 2.

The 2nd of the new functionality in the Development section is use the ternary operator when coding in the AL language.

The ternary operator ? : known from other programming languages streamlines conditional operations in code, enhances readability and reduces verbosity. It’s particularly useful for simple conditions, promoting code clarity and intent-focused programming. By allowing variable initialization within the same line, it ensures proper assignment and minimizes code length. With this release, AL now also supports the ternary operator.

Enabled for: Admins, makers, marketers, or analysts, automatically
Public Preview: Oct 2024
General Availability: Oct 2024

Feature Details

The ternary operator ? : can now be used to assign one of two values to a variable, depending on the condition of an expression.

Here’s an example of using if-then-else as until now and the new ternary operator.

Example of using ternary operator in AL to conditionally assign a variable value

Click to show/hide the New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 2 Series Index

New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 2: Set Up Easier In-Client Performance Profiling with Rules

Microsoft Dynamics 365 Business CentralThis post is part of the New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 2 series in which I am taking a look at the new functionality introduced in Microsoft Dynamics 365 Business Central 2024 Wave 2.

The 1st of the new functionality in the Development section is set up easier in-client performance profiling with rules.

Three releases ago Microsoft launched the in-client profiler, a very powerful tool for investigating performance issues across extensions. Since then, profiling has become essential to identify application performance problems for customers, partners, and support, and it’s the main performance troubleshooting tool for partners.

However, due to its current nature of being an interactive capture, acquiring a performance profile requires well-defined repro steps and collaboration across stakeholders.

To make it easier and faster for customers, consultants, pro developers, partners and Microsoft support to capture a profile, and thereby lower manual collaboration and time-to-mitigate, this release will add the additional support for capturing performance profiles automatically and noninteractively in the background, based on well-defined rules triggering capture. Captured profile details can then be analyzed afterwards.

Enabled for: Users, automatically
Public Preview: Oct 2024
General Availability: Oct 2024

Feature Details

In addition to the existing interactive way of capturing a performance profile – by starting the profile, performing repro steps in the client, stopping the profiler and then analyzing the results – a new rule-based scheduling mode for capturing profiles in the background is added.

With this, a customer admin, consultant, support person or developer can set up a specific scheduled rule, for example, to profile as a given user and session type for a given duration. Once the rule is defined and enabled, the server will trigger a profile each time the rule is met. At the end of the duration, profiling will stop, and the results can be inspected to see if there are any performance issues, including intermittent or long running ones.

To create a new profile rule schedule, open the Performance Profiler Schedules page. This lists the defined schedules, and the additional schedule details. From here, you can create a new schedule.

List of profile schedules

Continue reading “New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 2: Set Up Easier In-Client Performance Profiling with Rules”

In Microsoft Dynamics 365 Business Central (Power Automate Triggers), how do I… Create a Flow for an Approval

Microsoft Dynamics 365 Business CentralThis article is part of the In Microsoft Dynamics 365 Business Central (Power Automate Triggers), how do I… series, a sub-series of the In Microsoft Dynamics 365 Business Central (Power Automate), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

There are a number of triggers available in Power Automate for Business Central which allow flows to be started. In this small series, I am going to take a look at creating a flow for each of the triggers.

The third trigger which is available is for approval requests. This isn’t actually a single trigger but one for each of the approval requests which are possible. These triggers allows users to submit a master record or transaction for approval.

The following approval request triggers are available:

Trigger Description
When a customer approval is requested (V3)

Triggers a flow when a customer approval request occurs in Dynamics 365 Business Central.

When a general journal batch approval is requested (V3)

Triggers a flow when a general journal batch approval request occurs in Dynamics 365 Business Central.

When a general journal line approval is requested (V3)

Triggers a flow when a general journal line approval request occurs in Dynamics 365 Business Central.

When a purchase document approval is requested (V3)

Triggers a flow when a purchase document approval request occurs in Dynamics 365 Business Central.

When a sales document approval is requested (V3)

Triggers a flow when a sales document approval request occurs in Dynamics 365 Business Central.

When a vendor approval is requested (V3)

Triggers a flow when a vendor approval request occurs in Dynamics 365 Business Central.

When an item approval is requested (V3)

Triggers a flow when an item approval request occurs in Dynamics 365 Business Central.

This type of flow is created as an automated flow in the Power Automate portal; enter a Flow name and search for Business Central, scroll down the list of available triggers and select When a vendor approval is requested (V3). Click Create:

Build an automated cloud flow page with name entered

Continue reading “In Microsoft Dynamics 365 Business Central (Power Automate Triggers), how do I… Create a Flow for an Approval”