Skip to main content

AL Development 02 - How to Develop New Page in Database?

Hello Reader,


As we know to develop any solution in Business Central we must start working on AL Code Extension so from this blog you will get to know the detailed step how to create a page through AL Code in business Central.

Requirement: Need to create a new page to Insert, Modify, Delete the data from table.

Let’s Start the process:
Right Click on the left panel and select New File
My file name is My_PageList.al

 

Code Snippet for adding a new page, use snippet tpage as shown below:



As we select the tpage it will automatically generate a basic page design layout as below:


Now we must assign a page id and page name as per our naming convention which we are using along with this we need set some other properties as per below:
Set ApplicationArea to All.
Set UsageCategory to Lists (If it is a list type page)
Set Source Table to "TestTable”.


1. ApplicationArea - Based on Application area the user can see those in the application. It Sets the application area for a searched page or report in the web client. Standard values are All, Basic, Suite, and Advanced.

Below are things that will require this property

1. Page
2. Page Field
3. Page Action
4. Report
5. Report Request Page Fields

2. UsageCategory -
Option:  None, Lists, Tasks, ReportsAndAnalysis, Documents, History, Administration.
This property Sets the department column for a searched page or report in the web client. As there are no menusuite in web client UsageCategory used to set where these custom objects in Web Client Menu.
List page is mainly divided into two parts:
1. Layout Section: It has 2 sub parts
1.1. Repeater Group List of fields
1.2. Factbox Area which contains factboxes

2. Action Section: It contains all the actions that you want to add on the page actions.



You can add other fields in the page using snippet tfield. Also, to show how to add factbox I have added MyNotes Factbox. Below is the screenshot with all changes that are done in page.



Hope you enjoyed and learned from here.

Stay Tuned for more updates

Share your views in the comment section.

Comments

Popular posts from this blog

Improved performance features of Business Central 17

  In the training I’ve done to some partners last week, when talking about performances I shared an example of an extension with 3 features that I think are not so well known but that have a significant impact on how your code performs, expecially on a SaaS environment. That extension used the following features: Partial record loading Temporary Tables QueryCategory The  Partial record  capability  is a new feature available starting from Dynamics 365 Business Central 2020 Wave 2 (v17) and I think it’s one of my top personal desiderata from years. This feature permits you to load only the needed fields of a recordset (when accessing a data source) instead of loading the entire set of fields. This is particularly useful on reports and OData pages because you can avoid to do a SELECT * (plus JOINS with all the extension’s tables) and instead doing a SELECT of only the fields you need. Now you can do something like: procedure TestPartialRecord(): Decimal ...

Custom sheet name in RDLC Reports

Hi Readers, In this article we are going to discuss how to change the excel sheet name while using base Navision SAVEASEXCEL functionality. Applicable for RDLC reports of Navision and SSRS reports. Let’s say we have the following report that shows total sales by product category by territory:   When we export this report to Excel, we’d like each territory to appear in its own worksheet and each worksheet named after its territory: How do we make this work? Easy! 1) Put every group on its own page. 2) name each page using the same field the group uses. Step 1: Put each group on its own page To put each group on its own page, open the group’s property window. Then, in the Page Breaks category, put a check mark in the Between each instance of a group check box. Click OK to complete this step. Step 2: Name the pages of the group With the group selected in the Row Group s panel, press F4 to open the Properties window. Next, expand the Group ...

UPGRADE CUSTOMIZATIONS TO V2 EXTENSION (Application and Data)

From Navision 2018 Onwards, Navision only support v2 Extension. Dynamic Navision Extension will make upgrade easier. If customizations are converted into V2 extension that means v2 Extension consist upgraded Data as well as customizations, also it will be easy to upgrade into new version of Navision and apply CU updates. Below are the detailed steps to upgrade customizations into Navision 2018 v2 Extensions .  1) you have Customized database in Microsoft Dynamics Navision 2018. 2) Create the new table for each table that is customized or also for customized field in standard table but while creating table for standard table, add the primary key and customized field with same ID and Name in new table. For E.g.: I have created 1 table “Person” and 2 Customized Field (Test, Doc No) in “Sales Header”. Now create 2 New tables in 2018.  · Upg Sales Header -> Two base field (PK) and customized field -> Same ID and add primary key. Refer be...