Page controls

Controls on pages serve a variety of purposes. Some controls display information on pages. This can be data from the database, static material, pictures, or the results of a C/AL expression. Container controls can contain other controls. Group controls make it easy for the developer to handle a set of contained controls as a group. A FastTabs control also makes it easy for the user to consider a set of controls as a group. The user can make all the controls on a FastTab visible or invisible by expanding or collapsing the FastTab.

The user also has the option to show or not to show a particular FastTab as a part of the page customizing capability. The Help sections Pages Overview and How to: Create a Page provide good background guidance on the organization of controls within page types for NAV 2015.

The following screenshot from the Page Designer shows all the data controls on the Fixed Asset Card (Page 5600). The first column, Expanded, is a + or indicating whether the section is expanded or not. Type and SubType define how this control is interpreted by the Role-Tailored Client. SourceExpr defines the value of the control. Name is the internal reference name of the control. Caption is what will appear on the screen. The default values for Name and Caption originate from the table definition.

Page controls

The page's control structure can be seen in the indented format shown in the preceding image. The Container controls define the primary parts of the page structure. The next level of structure is the Group control level. In this page, those are the General, Posting, and Maintenance groups (each of which represents a FastTab). Indented under each Group control are Field controls.

The Fixed Asset Card page, complete with the action ribbon, displays as the following screenshot:

Page controls

The Group – FastTab correlation here is obvious. The Lines – FastTab connection is less obvious. It comes from the line where Type equals Part, SubType equals Page, and Name equals DepreciationBook. This control line embeds a page part as though it were defined as another Group. The Part – Page line has the same indentation level as the Group entries, thus is displayed at the same level as the Groups.

Control types

There are four primary types of page controls are Container, Group, Field, and Part. Container, Group, and Field controls are used to define the content area of the pages. Part controls are used to define FactBoxes and embedded subpages. When designing pages that may be used by different client types (such as the Web Client), we need to be aware that some controls operate differently or are not supported in all the different clients.

Container controls

Container controls can be one of three subtypes: ContentArea, FactBoxArea, or RoleCenterArea. Container controls define the root-level primary structures within a page. All page types start with a Container control. The RoleCenterArea Container control can only be used on a RoleCenter page type. A page can only have one instance of each Container subtype.

Group controls

Group controls provide the second level of structure within a page. Group controls are the home for fields. Almost every page has at least one Group control. The following screenshot, from Page 5600 – Fixed Asset Card (with all the Group controls collapsed), shows two Container controls and three Group controls. Also showing is a page Part control which displays a PagePart as a FastTab.

Group controls

The properties of a Group control are shown in the following image:

Group controls

Several of the Group control properties are particularly significant because of their effect on all the fields within the group.

  • Visible: TRUE or FALSE, defaulting to TRUE. The Visible property can be assigned a Boolean expression, which can be evaluated during processing. This allows for dynamically changing the visibility of a group of fields during processing based on some variable condition (dynamic processing must occur in either the OnInit, OnOpenPage, or OnAfterGetCurrRecord trigger and the variable must have its IncludeInDataSet property set to Yes).
  • Enabled: TRUE or FALSE, defaulting to TRUE. The Enabled property can be assigned a Boolean expression to allow dynamically changing the enabling of a group of fields.
  • Editable: TRUE or FALSE, defaulting to TRUE. The Editable property can be assigned a Boolean expression to allow dynamically changing the editability of a group of fields.
  • GroupType: It will be one of the five choices—Group, Repeater, CueGroup, FixedLayout, or GridLayout. The GroupType property is visible on the Page Designer screen in the column headed SubType (see the earlier Page Designer screenshot).
    • Group is used in Card type pages as the general structure for fields, which are then displayed in the sequence in which they appear in the Page Designer group.
    • Repeater is used in List type pages as the structure within which fields are defined and then displayed as repeated rows.
    • CueGroup is used for Role Center pages as the structure for the actions that are the primary focus of a user's work day. CueGroups are found in page parts, typically having the word Activities in their name and included in RoleCenter page definitions. The following screenshot shows two CueGroups defined in the Page Designer:
      Group controls

      These CueGroups are displayed in the RTC as follows:

      Group controls
    • FixedLayout is used at the bottom of List pages, following a Repeater group. The FixedLayout group typically contains totals or additional line-related detail fields. Many Journal pages, such as Page 39 – General Journal, Page 40 – Item Journal, and Page 201 – Job Journal have FixedLayout groups. The Item Journal FixedLayout group only shows Item Description (which is also available in a Repeater column), but could easily display other fields as well. A FixedLayout group can also display a lookup or calculated value like many of the Statistics pages (for example, Page 151 – Customer Statistics and Page 152 – Vendor Statistics).
    • GridLayout provides additional formatting capabilities to layout the fields row by row, column by column, spanning rows or columns and hiding or showing captions. Page 970 is one example of GridLayout use. To learn more about GridLayout use, search Help for Gridlayout.
  • IndentationColumnName and IndentationControls: These allow a group to be defined in which fields will be indented, as shown in the following screenshot of the Chart of Accounts page. Examples of pages that utilize the indentation properties include Page 16 – Chart of Accounts and Page 18 – G/L Account List.
    Group controls
  • FreezeColumnID: This freezes the identified column and all the columns to its left, so they remain in a fixed position while the columns to the right can be scrolled horizontally. This is similar to freezing a pane in an Excel worksheet. Users can also freeze columns as part of personalization.
  • ShowAsTree: This works together with the indentation property. ShowAsTree allows an indentation set of rows to be expanded or collapsed dynamically by the user for easier viewing. Examples are Page 583 – XBRL Taxonomy Lines, Page 634 – Chart of Accounts Overview, and Page 5522 – Order Planning.

Field controls

All field controls appear in the same format in the Page Designer. The SubType column is empty and the SourceExpr column contains the data expression that will be displayed.

All the field control properties are listed for each field, but individual properties only apply to the data type for which they make sense. For example, the DecimalPlaces property only applies to fields where the data type is decimal. Following is a split screenshot of the properties for field controls:

Field controls

We'll review those field control properties that are more frequently used or are more significant in terms of effect:

  • Visible, Enabled, and Editable: These have the same functionality as the identically named group controls, but only apply to individual fields. If the group control is set to FALSE, either statically (in the control definition within the page) or dynamically by an expression evaluated during processing, the Group control's FALSE condition will take precedence over the equivalent Field control setting. Precedence applies in the same way at the next, higher levels of identically named properties at the Page level, and then at the Table level. For example, if a data field is set to Non-Editable in the table, that setting will take precedence over (override) other settings in a page, control group, or control.
  • HideValue: This allows the value of a field to be optionally displayed or hidden, based on an expression that evaluates to TRUE or FALSE.
  • Caption and CaptionML: These define the caption that will be displayed for this field (in English or the current system language if not English).
  • ShowCaption: Set to Yes or No, this determines whether or not the caption is displayed.
  • MultiLine: This must be set to TRUE if the field is to display multiple lines of text.
  • OptionCaption and OptionCaptionML: These set the text string options that are displayed to the user. The captions that are set as page field properties will override those defined in the equivalent table field property. The default captions are those defined in the table.
  • DecimalPlaces: This applies to decimal fields only. If the number of decimal places defined in the page is smaller than that defined in the table, the display is rounded accordingly. If the field definition is the smaller number, it controls the display.
  • Width: This allows the setting of a specific field display width – the number of characters that can be included. It is especially useful for Control SubType of GridLayout.
  • ShowMandatory: This shows a red asterisk in the field display to indicate a required (mandatory) data field. ShowManadatory can be based on an expression that evaluates to TRUE or FALSE. This property does not enforce any validation of the field. Validation is left to the developer.
  • QuickEntry: This allows the field to optionally receive focus or be skipped, based on an expression that evaluates to TRUE or FALSE.
  • AccessByPermission: This determines the permission mask required for a user to view or access this field.
  • Importance: This controls the display of a field. This property only applies to individual (nonrepeating) fields located within a FastTab. Importance can be set to Standard (the default), Promoted, or Additional:
  • Standard: This is the normal display. Implementations of the rendering routines for different targets may utilize this differently.
  • Promoted: If the property is set to Promoted and the page is on a collapsed FastTab, then the field contents will be displayed on the FastTab line. If the FastTab is expanded, the field will display normally.
  • Additional: If the property is set to Additional and the FastTab is collapsed, there is no effect on the display. If the FastTab is expanded, then the user can determine whether or not the field is displayed by clicking on the Show More Fields or Show Fewer Fields display control in the lower-right corner of the FastTab.
  • RowSpan and ColumnSpan: These are used in conjunction with GridLayout controls as layout parameters.
  • ControlAddIn: When the field represents a control add-in, this contains the name and public token key of the control add-in.
  • ExtendedDatatype: This allows a text field to be categorized as a special data type. The default value is None. If ExtendedDatatype is selected, it can be any one of the following:
    • Phone No.
    • URL
    • E-Mail
    • Filter: Used on reports.
    • Ratio: For a processing progress bar display.
    • Masked: This fills the field with bold dots in order to mask the actual entry. The number of masking characters displayed is independent of the actual field contents. The contents of a masked field cannot be copied. If ExtendedDatatype is Phone No., URL, or E-Mail, an active icon is displayed on the page following the text field providing access to call the phone number, access the URL in a browser, or invoke the email client. Setting ExtendedDatatype will also define the validation that will automatically be applied to the field.
  • Image: This allows the display of an image on a Cue for a Field control in a CueGroup control. It only applies to a Cue control field of an integer data type. If no image is wanted, choose the value of None.

Page Part controls

Page Parts are used for FactBoxes and SubPages. Many of the properties of Page Parts are similar to the properties of other NAV components and operate essentially the same way in a Page Part as they operate elsewhere. Those properties include ID, Name, Visible, Enabled, Editable, Caption, CaptionML, ToolTip, ToolTipML, and Description.

Following is a list of the other properties which are specific to Page Part controls :

  • SubPageView: This defines the table view that applies to the named subpage (see WhseMovLines Part in Page 7315 – Warehouse Movement).
  • SubPageLink: This defines the field(s) that links to the subpage and the link (based on a constant, a filter, or another field). Also in Page 7315.
  • ProviderID: This contains the ID of another Page Part control within the current page. This enables us to link a subordinate part to a controlling parent part. For example, Page 42 – Sales Order uses this property to update the Sales Line FactBox by defining a ProviderID link from the FactBox to the SalesLines FastTab. Other pages with similar links include Page 41 - Sales Quote and Pages 43, 44, 50, 507, and 5768. In the following screenshot, we see the SalesLines PagePart (Control ID 58) linked to by the SalesLine Factbox.via the ProviderID value of 58:
    Page Part controls
  • PartType: This defines the type of part to be displayed in a FactBox. There are three options. Each option also requires another related property to be defined:

    PartType Option

    Required property

    Page

    PagePartID

    System

    SystemPartID

    Chart

    ChartPartID

  • PagePartID: This must contain the page object ID of a FactBox part, if the PartTypeOption is set to Page.
  • SystemPartID: This must contain the name of a predefined system part if the PartTypeOption is set to System. Available choices are Outlook, Notes, MyNotes, and RecordLinks.
  • ChartPartID: This must contain a chart ID if the PartTypeOption is set to Chart. The Chart ID is a link to the selected entry in the Chart table (Table number 2000000078).
  • UpdatePropagation: This allows updating the parent page from the child (subordinate) page. A value of Subpage updates the subpage only. A value of Both will cause the parent page to be updated and refreshed at the same time as the subpage.

Note

The NAV 2015 Chart Control Add-in provides significant additional charting capability. Information can be found in the Help section Displaying Charts Using the Chart Control Add-in.

Page control triggers

The following screenshot shows Page Control triggers. There are five triggers for each Field control. Container, Group, and Part controls do not have associated triggers.

Page control triggers

The guideline for the use of these triggers is the same as the one for Page triggers—if there is a choice, don't put C/AL code in a Control trigger. Not only will this make our code easier to upgrade in the future, but it will also make it easier to debug and easier for the developer following us to decipher our changes.

Bound and Unbound Pages

Pages can be created as bound (associated with a specific table), or unbound (not specifically associated with any table). Typically, a Card or List page will be bound, but Role Center pages will be unbound. Other instances of unbound pages are rare. Unbound pages may be used for communicating status information or initiating a process. Examples of unbound pages are Page 476 - Copy Tax Setup and Page 1040 – Copy Job (both of which have a PageType property of StandardDialog).

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

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