Extension points for frameworks


When a change needs to be propagated through the entire application, you should create an extension of that element to modify properties or components.

The following is an overview of common element types and the reasons for creating an extension of an element:

  • Labels - You would create a label extension file to modify the values of a label, add new labels, or add new languages. Label file extensions are named with an _extension suffix, such as FLM_Extension.
  • Enumeration (enum) - If the IsExtensible property is set to True, an enum can be extended to add new values to it.
  • Extended data types (EDTs) - You can modify properties for an EDT, such as the label, string size, or help text by creating an extension, if String Size Is Extensible is set to Yes.
  • Tables - You can extend a table to add new fields, indexes, or relations, and modify properties for the table elements or the table. You can also implement event handlers that are called from the base implementations of the table methods.
  • Data entities - Provide a denormalized version of underlying table schemas. Data entities can be extended for many of the same reasons as tables and can also be extended to add data sources.
  • Forms - Can be extended to add a new data source, add a new control, or modify properties such as labels, help text, and captions. Like tables, you can implement event handlers that are called from the base implementations of form methods.
  • Menus - Menus, such as the main menu, are extended to add new menu items, submenus, or menu references or to hide any of these items. For example, if you created a new module, you would extend the main menu (Navigation pane) to add your submenu to it.

While many extension capabilities exist, some customizations cannot be completed by using extensions. To achieve these customizations, you need to log a request with Microsoft that specifies your needs. These requests are logged in a specific project in Lifecycle Services. Related requests should be logged under the same project so Microsoft has a complete view of all requests for a specific implementation. In your Lifecycle Services project, you select the hamburger icon in the top-middle of the screen and select Support to view logged extensibility requests and/or to create a new extensibility request. Your extensibility request is then added to a backlog that is worked on by engineers. If a request is considered too intrusive, it is not be supported because it could prevent a seamless upgrade.

Intrusive customizations are one of the main obstacles to keeping continuous upgrade costs as low as possible. When compiling code, Visual Studio prevents some types of intrusive customizations, but not all are detected.

Follow these guidelines to help ensure that you are not performing customizations that are too intrusive:

  • A type's definition should not be changed because it is a breaking change that requires the update of all references. Ensuring that future references are implemented correctly is impossible if the type definition is changed.
  • A model's author should remain in control of encapsulated code and types to make improvements to the application.
  • Adding new behaviors is encouraged and is enabled by using extensions.
  • Extension capabilities must be designed as open for extensions, and they must support multiple extensions that exist side by side in the same installation.

To create an extension (in general terms), follow these steps:

  1. In the Application Explorer window, expand the AOT node.
  2. Expand the node for the element that you want to extend. For example, in Classic view, extend the Data Models node, and then extend the Tables node to view all available tables.
  3. Right-click the element that you want to extend.
  4. Select Create extension to add an extension to your current project. Select Create extension in new project if you want to add the extension to a new project. The element is added to a project in the Solution Explorer window, and it opens in the element designer.