Dynamics 365 Business Central: “this” is a nice AL addition.


The AL language version 14 introduces a new "this" keyword for self-reference on all objects in Dynamics 365 Business Central. This keyword allows codeunits to pass a reference to "this" as an argument to another method and improves readability by signaling that a referenced symbol is a member on the object itself. The new "this" keyword works on every AL object, but codeunits and interfaces are where it can be used the most. Examples of usage include passing "this" as a value to a method, referencing an enum value using the "this" syntax, and using "this" in page objects. Overall, this addition adds an "object-oriented" aspect to the AL language.


Article 11m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time