AL language now supports ternary (conditional) operator. The ternary operator? : known from other programming languages, streamlines conditional operations in code, enhances readability and reduces verbosity. The following examples show how the code GetBooleanText() can be rewritten using the ternary operator to be less verbose and more succint. Without the ternary operator: With the ternary operator …
Category: Microsoft Dynamics Business Central
Mar 13
Include Resources in extensions
Good news! Resource files can now be included as part of an extension. This new option enables developers to package essential resources, such as images, configuration settings, and text files, directly with their extensions, ensuring that all necessary components are readily accessible and improving overall performance. To add resources to the extension, the following property …
Mar 11
AL now supports the Continue statement
From runtime version 15, it is possible to use the continue keyword in loops to continue to the next iteration. (Please make sure that your “AL Language extension for Microsoft Dynamics 365 Business Central” is version 15.0 or above) The continue statement allows skipping the remaining code in a loop’s current iteration and jumping directly into the …
Mar 11
Multiline strings: AL now has support for multiline string literals.
AL now support multiline string literals. It will enhance code readability and maintainability, especially when dealing with lengthy text content or complex string literals. Functionality is available with the AL Language Extension version 15.0 My first thought was, “Oh, we can use this to store the prompts for Copilot or OpenAI.” However, Dmitry suggested that …
Mar 11
Do you know you can navigate directly to a symbol of a file in VS Code?
All you need to do is press “Ctrl” + P and type the object name you want to navigate to. Then press @. It will list all the object’s fields, functions, and triggers. You can select the place you want to jump into. Regards,Tharanga Chandrasekara
Mar 11
How to Enable Outbound HTTP Requests in the Sandbox
Did you know that outgoing HTTP requests are automatically disabled when a Business Central sandbox is created to prevent unintended calls? To enable outgoing HTTP requests in a sandbox environment, follow these steps:1. Go to the Extension Management page.2. Select the extension making the HTTP request.3. Enable the “Allow HttpClient Requests” option in the extension’s …
Mar 11
Do you specify the 𝐑𝐮𝐧𝐓𝐫𝐢𝐠𝐠𝐞𝐫 parameter?
When you call the Insert, Modify, or Delete functions, it is important to specify the 𝐑𝐮𝐧𝐓𝐫𝐢𝐠𝐠𝐞𝐫 parameter. If you do not include this parameter, the compiler assumes you 𝒅𝒐 𝒏𝒐𝒕 𝒘𝒂𝒏𝒕 to run the trigger. 𝑨𝒍𝒘𝒂𝒚𝒔 𝒃𝒆 𝒄𝒍𝒆𝒂𝒓 𝒂𝒃𝒐𝒖𝒕 𝒚𝒐𝒖𝒓 𝒊𝒏𝒕𝒆𝒏𝒕𝒊𝒐𝒏𝒔. For example:If you do not want to run the trigger, use:Record.Modify(𝐟𝐚𝐥𝐬𝐞); Avoid using:Record.Modify(); If …
Feb 02
Are you looking for an Action image browser in BC?
AL developers for Microsoft Business Central need to browse the Business Central image gallery to select meaningful images. This allows them to assign these images to new action buttons, enhancing the user interface for better usability. The AZ AL Dev Tools extension simplifies this process by adding new commands that load and display available images …
Feb 02
Decluttering Your Enums: How to Show Only What Matters
It is common practice to use existing objects when developing new modules. Microsoft Dynamics 365 Business Central offers a wide array of pre-defined enums; however, specific options within these enums may not be relevant to the new module’s requirements. Additionally, there may be instances where it is advisable to restrict users from selecting specific values …