WDTU Page Enhancement – part 1

Before we move on to learn about controls and actions, let's do some basic enhancement work on our WDTU Radio Show application. Back in Chapter 1, An Introduction to NAV 2015, we created several minimal pages, then later added new fields to our Radio Show master table (Table 50000). We'll now enhance the Radio Show List and Card to include those added fields.

Because our previous page development work resulted in simple pages, we have the opportunity to decide whether we want to start with the New Page Wizard and replace our original pages or use the Page Designer to modify the original pages. If we had done any significant work on these pages previously in the Page Designer, the choice to go right to the Page Designer would be easy. Let's do a quick evaluation to help us make our decision. First, let's take a look at the existing Radio Show List page, as can be seen in the following screenshot:

WDTU Page Enhancement – part 1

We want to compare the list of fields that exist in the source table (Radio Show – 50000) to what is already in the page. If there are only a couple of fields missing, it will be more efficient to do our work in the Page Designer. The quickest way to inspect the fields of the source table is to use the About This Page Help information available from the drop-down at the left end of the Global Command Bar:

WDTU Page Enhancement – part 1

When we click About This Page (or Ctrl + Alt + F1), the following screen displays:

WDTU Page Enhancement – part 1

When we scroll down the list of fields in Table 50000 (which are displayed alphabetically, not by field number or in order of placement in the page), we see that there are quite a few fields in the table that aren't in our page. This makes it easy to conclude that we should use the Page Wizard to create the new version of our Page 50000 – Radio Show List.

Although the Wizard allows us to choose and sequence fields in our new list form, for the sake of simplicity, we will just insert all the fields at once in the order in which they appear in the table. In other words, we will choose the >> button to include all the fields. Then, because we know that the Date Filter field is only for filter control of related tables and will not contain visible data, we will remove that field. Our Wizard screen will look like the following screenshot:

WDTU Page Enhancement – part 1

Finish the Page, Saving it as Page 50000, Radio Show List, overwriting the old version. If we wanted to be very safe, before making any changes, we would have done an Export of the original version of Page 50000 as a .fob file (using File | Exprort).

Next we want to also create a new layout for the Radio Show Card. We'll make the same choice for the same reasons, to use the Page Wizard to create a new version of the card page. When we review the data fields, we decide that we should have three FastTabs: General, Requirements, and Statistics. As before, the Date Filter field should not be on the page. After we have generated, compiled, and saved our new Radio Show Card, it looks like the following screenshot:

WDTU Page Enhancement – part 1

Our final step at this point is to connect the Radio Show Card to the Radio Show List page so that when the user double-clicks on a list entry, the Card page will be invoked show the list selected entry. This is a simple matter of opening our new Page 50000 in the Page Designer, highlighting the first empty line in the Controls list, and Clicking on the Properties icon (or Shift + F4 or View | Properties).

In the list of page properties displayed, we will find CardPageID. Fill in that property with either the name (Radio Show Card) or Object ID number (50001) of the target card, save and compile, and run. We should see a ribbon as shown in the following screenshot with both Edit and Edit List showing:

WDTU Page Enhancement – part 1

Clicking on Edit will bring up the Radio Show Card. Clicking on Edit List will make the line in the list editable in place. If we don't want the user to be able to edit within the list, we could change the List page property Editable to No and the Edit List option will not be available, as shown in the following image:

WDTU Page Enhancement – part 1
..................Content has been hidden....................

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