Book Image

Extending Microsoft Dynamics 365 for Operations Cookbook

By : Simon Buxton
Book Image

Extending Microsoft Dynamics 365 for Operations Cookbook

By: Simon Buxton

Overview of this book

Dynamics 365 for Operations is the ERP element of Microsoft’s new Dynamics 365 Enterprise Edition. Operations delivers the infrastructure to allow businesses to achieve growth and make better decisions using scalable and contemporary ERP system tools. This book provides a collection of “recipes” to instruct you on how to create—and extend—a real-world solution using Operations. All key aspects of the new release are covered, and insights into the development language, structure, and tools are discussed in detail. New concepts and patterns that are pivotal to elegant solution designs are introduced and explained, and readers will learn how to extend various aspects of the system to enhance both the usability and capabilities of Operations. Together, this gives the reader important context regarding the new concepts and the confidence to reuse in their own solution designs. This “cookbook” provides the ingredients and methods needed to maximize the efficiency of your business management using the latest in ERP software—Dynamics 365 for Operations.
Table of Contents (16 chapters)

Using Interfaces for extensibility through metadata

Interfaces enforce that all classes that implement them also implement the methods defined in the interface. This has all the traditional benefits associated with them, but in Dynamics 365 for Operations, we can go further.

We should create an interface called MyRunnableI with a method called Run() and a class that implements it called MyRunningPerson (which must have a method called Run()). We can assign an instance of MyRunningPerson to a variable of type MyRunnableI and call its Run() method. This allows greater flexibility and extensibility of our code.

However, in Dynamics 365 for Operations, we can create a plugin framework where the class to instantiate is configured in data. We can, therefore, control which class gets instantiated based on conditions only known at runtime.

In order to focus more on the way that we can use interfaces to create a plugin pattern...