Skip to main content

Posts

Showing posts from October, 2020

Business Central: obsoleting WITH statement

Today, I have been checking some of my extensions for business central 17 compatibility. Majorly, I found that it is giving a warning for with statements. After that, I checked some blogs on the google and found that it is going to be obsolete soon in the newer version of business central.
With clause can help us to write a more readable source code for our customization. In fact, Microsoft is already using this with clause many times the we have seen in the Navision as well as in the business central.We have to change our code for solving this problem as soon as possible. Many people are asking that it is just a warning why we need to take care today but my answer is always to change your code as earliest as possible for not creating mess at the deadline.
I hope you will understand the seriousness of handling With clause. After changing code when you compile source you will not get a warning for code AL0606.

Protected Variable in AL

If you want to make a global variable accessible from table to table extension, or from page to page extension, you would normally need to create a procedure to get or set the variables. With protected variables, you no longer need to do that.The protected keyword can be used to make variables accessible between tables and table extensions and between pages and page extensions. If you want to only expose some variables as protected, you must create two sections of variables declarations.Let’s give an example. I have a core extension with a new page called “My Item List”.
1 2 3 4 5