Book Image

Microsoft Dynamics 365 Extensions Cookbook

Book Image

Microsoft Dynamics 365 Extensions Cookbook

Overview of this book

Microsoft Dynamics 365 is a powerful tool. It has many unique features that empower organisations to bridge common business challenges and technology pitfalls that would usually hinder the adoption of a CRM solution. This book sets out to enable you to harness the power of Dynamics 365 and cater to your unique circumstances. We start this book with a no-code configuration chapter and explain the schema, fields, and forms modeling techniques. We then move on to server-side and client-side custom code extensions. Next, you will see how best to integrate Dynamics 365 in a DevOps pipeline to package and deploy your extensions to the various SDLC environments. This book also covers modern libraries and integration patterns that can be used with Dynamics 365 (Angular, 3 tiers, and many others). Finally, we end by highlighting some of the powerful extensions available. Throughout we explain a range of design patterns and techniques that can be used to enhance your code quality; the aim is that you will learn to write enterprise-scale quality code.
Table of Contents (19 chapters)
Title Page
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Creating a LINQ data access layer


In preparation for writing our first plugin in the next recipe, we will start in this recipe by creating a simple data access layer. A sample functional requirement states that; any e-mails associated with a specific account with no subject are to be closed, and the rest are to have an updated due date ten days from today's date when an account name is changed. In this recipe, we will only focus on retrieving the e-mails associated with a specific record, closing e-mails as canceled, and updating the rest.

This recipe will also leverage the unit of work pattern provided with the organization service context generated with the early bound entity generation. The patterns is explained in the How it works... section.

Getting ready

To write your data access layer, you will need the early bound entities generated as per the Creating early bound entity classes recipe from Chapter 3, SDK Enterprise Capabilities; optionally, you can generate the enums for the status...