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

Preface

Microsoft Dynamics 365 is a powerful and versatile platform that has been around for more than a decade. With each release, the platform increased in richness and popularity. Being a moving target, it is often difficult to keep up with the features and capabilities introduced in the latest version. This book will help you narrow that knowledge gap in respect to the Dynamics CRM side of the product.

This Microsoft Dynamics 365 Extensions Cookbook not only covers classical configuration and customization extension topics, but also new Dynamics 365 features applicable to online Software-as-a-Service (SaaS) cloud ecosystems. Some topics are applicable to older versions of Dynamics CRM, but most cover new patterns, frameworks, and tools that synergise well with the latest version. Unorthodox ideas, design patterns, and best practices are discussed throughout the book, differentiating it from other pieces of work.

With its cookbook format, this book sets out to enable you to harness the power of the Dynamics 365 platform, and caters to your unique circumstances through simple-to-follow step-by-step extension recipes.

Hope you enjoy it.

What this book covers

Chapter 1, No Code Extensions, starts by covering some of the fundamental entity modeling techniques you could use when configuring your Dynamics 365 instance. This chapter also lightly touches on some of the point-and-click configuration capabilities of the platform, such as workflows, actions, rollup and calculated fields, and others.

Chapter 2, Client-Side Extensions, delves straight into the client-side development capabilities of the platform. It covers best practice reusability techniques, Web API queries, debugging walkthroughs, and advanced web resource building using frameworks such as AngularJS.

Chapter 3, SDK Enterprise Capabilities, lets you take a look inside the SDK for some valuable gems. Ranging from tools, to new Dynamics 365 features, to extensions that improve your productivity, this chapter is essential when working on large-scale enterprise solutions.

Chapter 4, Server-Side Extensions, guides you through the server-side customization's realm. Core to this book, this chapter deals with different ways of setting up your environment to build custom plugins, workflows, and activities. This chapter also walks you through server-side debugging techniques for online as well as on-premises Dynamics 365 implementations.

Chapter 5, External Integration, gives you a glimpse into different integration patterns. Using out-of-the-box interfaces or third-party tools, this chapter covers a few typical scenarios you might face in real life when integrating from and to Dynamics 365 whilst using different programming languages.

Chapter 6, Enhancing Your Code, builds on the previously discussed code extensions and introduces best practices and code structures to render your extensions cleaner and more maintainable--an essential practice when building large-scale solutions. Improved code structures further enable different types of unit testing possibilities that are also covered in this chapter. This chapter also briefly touches upon plugin profiling, building read audits, and setting up Cross Origin Resource Sharing with Dynamics 365 online.

Chapter 7, Security, covers core non-functional capabilities of the platform. With its comprehensive security capabilities, this chapter demonstrates different modeling techniques and features that will enhance your platform's security, such as team structures, field-level security, and encryption, along with their performance implications.

Chapter 8, DevOps, deals with the topics of source control integration and deployments by discussing solution structuring techniques, patching, automation, and release orchestration integration with third-party tools. This chapter's smaller recipes form the bigger picture for a complete continuous integration pipeline.

Chapter 9, Dynamics 365 Extensions, takes you beyond Dynamics CRM and covers the latest enhancements introduced with the Dynamics 365 rebranding. Dynamics 365 apps, AppSource, and the common data services with Flow are among the topics discussed in this chapter.

Appendix A, Architectural Views, is written in a solution architecture document format with different views to cater for different stakeholders. It covers a business view, a logical view, a deployment view, and a collection of non-functional requirement controls.

Appendix B, Dynamics 365, finishes off this book by talking about the significance of the Dynamics 365 release compared to previous Dynamics CRM releases, and ends the book with a brief conclusion.

What you need for this book

All recipes in this book will require a Microsoft Dynamics 365 instance up and running. Most recipes are targeted at the online version, with a good portion also applicable to on-premises instances.

It is highly recommended that you use a non-production instance to try the recipes. Alternatively, a trial version can be requested from https://trials.dynamics.com/CustomerEngagement/ChangeSignup/.

Code customization requires Microsoft Visual Studio to facilitate the development. At the time of writing, the most compatible version is Visual Studio 2015. Some of the recipes will also require the Dynamics 365 SDK.

Some recipes require third-party products and tools that need to be installed. Most offer a free trial or a free edition, as described in their respective recipes.

Who this book is for

This book is aimed at a wide audience. Mainly focused on people looking at extending Dynamics 365, it can also be used by executives and influencers to understand the platform’s capabilities and versatility.

New or seasoned developers, administrators, consultants, and power users who want to learn about best practices when extending Dynamics 365 for enterprises will benefit the most from this book. The wide target audience is the reason for the range of different topic complexity covered in this book, ranging from no code configuration to complex coding customization.

A basic understanding of the Dynamics CRM/365 platform, as well as some basic development skills, are recommended, but not necessary.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).

To give clear instructions on how to complete a recipe, we use these sections as follows.

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Create a public business logic class called UpdateEmailLogic under a BusinessLogic folder."

A block of code is set as follows:

packtNs.graduateForm = packtNs.graduateForm || {}; 
packtNs.graduateForm.loadEvent = function(){ 
  Xrm.Page.getAttribute("packt_supervisor").addOnChange(
  populateWithTodaysDate); 
} 

Any command-line input or output is written as follows:

# cp /usr/src/asterisk-addons/configs/cdr_mysql.conf.sample     /etc/asterisk/cdr_mysql.conf

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Navigate to Settings | Solutions | Packt."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors .

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Microsoft-Dynamics-365-Extensions-Cookbook. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.