Dynamics 365 FO - Customize with extensions and overlayering - Part 1 - Song Nghia - Microsoft Dynamics Partner

Song Nghia - Microsoft Dynamics Partner

Song Nghia - Microsoft Dynamics Partner

Breaking

Saturday, September 17, 2022

Dynamics 365 FO - Customize with extensions and overlayering - Part 1

 Dynamics 365 FO - Customize with extensions and overlaying

Nghia Song -  Microsoft Dynamics 365 Technical Consultant

Nghia Song

Tel - WhatsApp: +84967324794

Email: songnghia.uit@gmail.com


  1. Overlaying

You can customize the source code and metadata of model elements that are shipped by Microsoft or third-party Microsoft partners. In order to customize metadata and source code of a model, the developer must create a new model that overlays the model they want to customize. For example, solution developers can provide code in the SLN layer, independent software vendors can use the ISV layer, and value-added resellers can use the VAR layer. Functionality defined in higher layers (VAR layer in this example) can override the functionality of lower layers. The overlaying model must belong to the same Package as the source model and belong to a layer that is higher than the source model. Overlayering is a powerful tool to perform advanced customizations of metadata and source code, but may increase the cost of upgrading a solution to a new version.

  1. Extensions

You can customize an application by using extensions. An extension enables you to add functionality to existing model elements and source code. Extensions provide the following capabilities:

  • Creating new model elements.

  • Extending existing model elements.

  • Extending source code using class extensions.

  • Customizing business logic. Ways to customize business logic include:

  • Creating event handlers to respond to framework events, such as data events.

  • Creating event handlers to respond to event delegates that are defined by the application.

  • Creating new plug-ins.

  1. Extension models and packages

As we know, we can create a model that contains only new model elements, new code, or extensions. This model is compiled into its own separate assembly. These assemblies, along with related metadata and runtime artifacts can be packaged (as a deployable package file) and deployed on runtime sandbox or production environment. 

  1. Code extensions

You can extend source code in 3 ways:

  • By subscribing to events (framework events and delegates)

  • By writing plug-ins.

  • By creating class extensions (aka class Augmentation), see section below.

You should understand the following characteristics of framework events:

  • Events are implemented as multi-cast delegates, which means that more than one event handler can be subscribed to any particular event.

  • Events are broadcast; there's no sequencing of calls to event handlers.

  • Event handlers execute within the transaction scope of the base methods.

Next: Dynamics 365 FO - Customize with extensions and overlayering - Part 2 https://www.songnghia.com/2022/09/dynamics-365-fo-customize-with_17.html

No comments:

Post a Comment