AL(Application Language) is a programming language which is used to build extensions on top of business central. Business Central is an ERP(Enterprise Resource Planning) software which contains different modules like finance, purchase, production, HR etc.
AL Programming language is an object based language, that is all the operations are done on objects or by using objects.
Some of the objects in AL programming Language are Tables, Pages, Reports, XML ports, Codeunits, Queries, Enums etc.
Business Central UI's are called as pages, each page will have a table, the pages show the data that is stored in the table.Depending on the type of page you are creating the UI of the page will be defined. The above mentioned page Purchase Order is of type Document.
The following page is of type list, this will show all the purchase orders in the form of records.
To create a page in your custom extension, that is to show the data, we need table. The table is usually composed of fields, keys(to uniquely define each row in a table), table triggers, field triggers.
Usually we write all the custom logic in codeunits.
To create a table, first you need to create new file in your project, give a name to your table and end it with .al extension.
To start writing code you can type ttable then it will give you the whole template to create the table
The following image shows an example of the table
Fields can contain their own triggers
Pages in AL can be created the same way we created tables, but pages use tables.
To create a page you can type tpages then it will give template, by using that template you can create a page.
The following image shows the page and different components of a page.
Page fields can have their own field triggers
Writing custom logic in Codeunits:
Comments
Post a Comment