What's New: AL - Language (2024 release wave 2)
AL language changes in Business Central 2024 release wave 2: new table field property for text search, profile extensions, extendable interfaces, date and time properties, self reference (this), PATCH on HttpClient, and the ternary operator. Also covers page customization clear properties and query tool tips.
- Introduction and Overview
- Table Changes and Text Search Optimization
- Page Types and Prompting Actions
- Page Style Enum and Profile Extensions
- Page Customizations and Clear Methods
- Queries, Interfaces, and New Collections
- Date and Time Properties
- Self Reference and Code Analysis
- Resources and HTTP Client Methods
- Ternary Operator Introduction
Overview
The video, published 2024-10-08 and about 11 minutes long, walks through what is new in the AL language for 2024 release wave 2. It goes through table, page, query, interface, date and time, resource and HTTP changes, and ends with the ternary operator.
Some items are marked as not usable yet. The configuration dialogue page type is under development and cannot be used. The AI tokens used method in session information is not ready for use. The clear layout, clear actions and clear views properties come with a caveat for role customizations.
Key points
- Tables get a field property for optimized text search, also exposed on field references through the is optimized for search property.
- Page customizations get clear layout, clear actions and clear views properties. You then add back only what you need. Using them in page customizations used in role customizations causes errors.
- Profiles can be extended, so you no longer copy an existing profile to build on it. Interfaces can also be extended with more methods.
- A list of code units can be used, and a code unit can be assigned to an interface by simple casting if it implements that interface. New is and as keywords work with interfaces.
- Date, DateTime and Time types get properties such as day of week, month, day, year, hour, minute, second and millisecond.
- The this self reference lets code refer to the current object. A code analyzer and code action can enforce the this prefix across a document, project or workspace, but it is hidden by default.
- NavApp gets a method for reading app resources by name into a stream, and HttpClient gets a PATCH method. The ternary operator condenses if-else logic, but can become hard to read if misused.
Features
| Feature | Status | At |
|---|---|---|
| Optimized for Text Search Property | status not stated, demoed | 0:40 |
| Configuration Dialogue Page Type | status not stated, demoed | 1:08 |
| Prompting Actions on Pages | status not stated, demoed | 1:40 |
| Page Style Enum | status not stated, demoed | 2:03 |
| Profile Extensions | status not stated, demoed | 2:37 |
| Clear Layout, Clear Actions, and Clear Views Properties | status not stated, demoed | 2:57 |
| Query Tool Tips | status not stated, demoed | 3:53 |
| Query JSON Save Support | status not stated | 4:13 |
| Extendable Interfaces | status not stated, demoed | 4:13 |
| New Interface Keywords (is and as) | status not stated | 4:34 |
| List of Code Units | status not stated, demoed | 4:53 |
| Date and Time Properties | status not stated, demoed | 5:31 |
| Self Reference (this) | status not stated, demoed | 6:31 |
| Code Analyzer for Self Reference | status not stated, demoed | 7:09 |
| NavApp Get Source Method | status not stated, demoed | 7:51 |
| Session Information AI Tokens Used | status not stated, demoed | 8:11 |
| HTTP Client PATCH Method | status not stated, demoed | 8:45 |
| Ternary Operator | status not stated, demoed | 9:05 |
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- other “NavApp” at 7:51
- other “field ref” at 0:54
- other “fields record” at 0:54
- other “page style enum” at 2:03
- other “session information type” at 8:11
Quotes
- 0:40 “on tables you’ll Now find a new property for Fields that’s called optimized for text search”
- 1:28 “the feature is under development and cannot be used”
- 2:37 “you can now extend profiles with additional customizations if you want to allowing you to build on existing profiles instead of having to copy”
- 4:13 “you can now extend interfaces so instead of having to move to a complete new interface you can now build on top of an”
- 4:53 “as part of the work with interfaces we’ve add list of interfaces in the last release we added list of in and outstream and”
- 5:31 “we have additional properties on the date date time and time types that will allow us to make much easier logic”
- 6:31 “we’ve added this to the language this is a self reference so with this you can reference the object that you’re currently in”
- 9:05 “the turn are operator has been added to the a language it’s very common in many languages and it has a way of simplifying”
Disclaimers in the video
- 1:08 preview: there’s a new page type called configuration dialogue it’s part of our AI investment for now you cannot use it until we get this done
- 1:28 preview: the feature is under development and cannot be used
- 8:11 preview: not quite ready yet for consumption
- 8:31 preview: this one is not ready for use yet so more to come later
Presenters (as heard): Stepan B.
