Page Designer

The Page Designer is accessed from within the Development Environment through Tools | Object Designer | Page. It can be opened either for creation of a new page by using the New button or for editing an existing page by highlighting the target object, then clicking the Design button.

New Page Wizard

When we click on the New button, or F3, or Edit | New, we bring up the New Page Wizard.

New Page Wizard

We can proceed to the Page Designer with the PageType property set to Card and no SourceTable defined by clicking on OK with Create blank page selected, and not entering a Table Name or Number. Or we could enter a Table Name or Number, select Create a page using a wizard, and select a Page Type. That will take us to the Page Wizard with the PageType property set to our choice and the SourceTable assigned to the table we entered. There is almost always less effort to use the Wizard to create at least a rough version of a page design, then modify the generated object structure and code to get the ultimate desired result.

To use the Page Wizard, first we enter the name or number of the table to which we want our page to be bound. Then we choose what PageType we want to create – Card, List, RoleCenter, CardPart, ListPart, Document, Worksheet, ListPlus, ConfirmationDialog, StandardDialog, or NavigatePage. The subsequent steps the Page Wizard will take us through depend on the PageType chosen. The following chart shows which options are available for each Page Type through use of the Wizard:

Page Type

Fast Tabs

Fields to Display

FactBoxes

Page Designer

RoleCenter

-

-

-

Card

List

-

Document

ListPlus

Worksheet

-

ConfirmationDialog

-

StandardDialog

-

-

-

NavigatePage

CardPart

-

-

ListPart

-

-

To see what the Page Wizard looks like, we'll step through an example definition of a Card page based on our Table 50000 – Radio Show (this example is only done to illustrate the Page Wizard process – we aren't creating a page that we'll keep for our Radio Show application).

Invoke the Page Designer Wizard by clicking on the New button with the Page button highlighted. Enter 50000 in the Table field, select the Create a page using a wizard: option, select Card, and click on the OK button. The next screen allows us to define FastTabs. It displays a default first FastTab titled General. For our example, we'll add two more FastTabs, Tab 1 and Tab 2.

New Page Wizard

We click Next and proceed to the screen to assign fields from our bound table to each of the individual tabs. The single arrow buttons move one field either onto or off of the selected tab. The double arrow buttons move all the fields in the chosen direction. In the following screenshot, five fields have been selected and assigned to the General tab:

New Page Wizard

We can move fields back and forth between the chosen and available sets, as well as reposition them in the Field Order until we are satisfied with the result. If we realize that we should have defined our tabs differently, we can click on the Back button and return to the FastTab definition screen to revise the tab assignments.

After all the desired fields have been assigned to the appropriate tab in the desired order, we will click Next and move on to the screen that allows us to assign FactBoxes to the Page. Many different page components are made available by the Wizard for assignment as FactBoxes.

As we will see in the next screenshot, many of the choices are not appropriate for use in most pages. We can only select previously created page parts for FactBoxes. This leads to an important concept.

Tip

Even though we can add component parts later, it's good practice to plan our page design layout ahead of time and construct the component parts first (start with just place holder page parts now and modify them later to be fully functional).

If we had not yet defined the FactBoxes for our current page design, we could pick other similar page components and then make the appropriate code replacement later in the Page Designer.

New Page Wizard

Once we have done all the assignment work that is feasible within the Page Wizard, we will click Finish. The Page Wizard will generate the object structure and C/AL code for our defined page and present the results to us in the Page Designer, as shown in the following screenshot:

New Page Wizard

We realize now that it would have been more efficient to have planned ahead and created our custom FactBox page parts before we used the Wizard to create our card page. The alternative we used was to simply add a couple of FactBox page parts as place holders which we could replace later. That gave us the structure we wanted and compensated for our lack of planning. We could wait and just add the FactBoxes later, but we wouldn't be taking advantage of the help the Wizard can provide.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.15.135