Reader small image

You're reading from  Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition

Product typeBook
Published inMar 2020
PublisherPackt
ISBN-139781838643812
Edition2nd Edition
Right arrow
Author (1)
Simon Buxton
Simon Buxton
author image
Simon Buxton

Simon Buxton has worked with Dynamics 365 Finance and Supply Chain Management since its earliest incarnations, starting with the product in early 1999 when Dynamics 365 Finance and Supply Chain Management was known as Damgaard Axapta 1.5. Simon has been the technical lead on many highly challenging technical projects in countries all around the world. These projects included complex integrations with on-premises and external systems, ISV solutions, and many technically challenging customer solutions. Now working with Binary, he was part of a team that implemented the first Dynamics 365 Finance and Supply Chain Management implementation as part of the Community Technical Preview (CTP) program, which led to the close working relationship with Microsoft that made this book possible
Read more about Simon Buxton

Right arrow

Preface

Microsoft Dynamics 365 Finance and Supply Chain Management form an ERP solution for complex single-site, multi-site, and multi-language global enterprises. This flexible and agile solution provides advanced functionality for manufacturing, retail, public sector, and service sector industries. Not only does this solution provide a strong set of built-in functionality, but it also provides an industry-leading integrated development environment, allowing an organization to provide even higher levels of fit. This book should be in the tool belt of any software engineer who works with or is about to embark on a career with Microsoft Dynamics 365 Finance and Supply Chain Management.

This book provides software engineers and those involved in developing solutions within Dynamics 365 Finance and Supply Chain Management with a toolkit of practical recipes for common development tasks, with important background information to provide deep insight to allow the recipes to be adapted and extended for your own use. Even for experienced software engineers, this book will provide a good source of reference for efficient software development.

For those moving from Microsoft Dynamics AX 2012, we cover critical changes in how software is adapted, how to use the new extensibility features of Microsoft Dynamics 365 Finance and Supply Chain Management, and tips on how to use them practically. We also cover the fundamental changes in the physical structure of the application metadata, the application development life cycle, and how everything fits in with the new cloud-first development paradigm with Lifecycle Services and Visual Studio Team Services. The integration will be a concern for AX developers, and we cover this in detail with working examples of code that can be adapted to your own needs.

The book follows the development of a solution as a means to explain the design and development of tables, classes, forms, BI, menu structures, workflow, and security. We begin at the start of the development process by setting up an Azure DevOps project, integrating Lifecycle Services, and explaining new concepts such as Packages, Models, Projects, and what happened to layers. The book progresses with chapters focused on creating the solution in a practical order, but it is written in such a way that each recipe can be used in isolation as a pattern to follow.

The sample solution was designed and developed as the book was written and is available for download. There are sample projects covering the development of new features, extending standard functionality, writing test cases, and integration with external services and from C# projects back into Finance and Supply Chain Management.

With this comprehensive collection of recipes, you will be armed with the knowledge and insight that you will need to develop well-designed solutions will help your organization to get the most value from this comprehensive solution for both the current and the upcoming releases of Microsoft Dynamics 365 Finance and Supply Chain Management.

What this book covers

Chapter 1, Starting a New Project, covers setting up a new Azure DevOps project, integrating with Lifecycle Services, and creating a Microsoft Dynamics 365 Finance and Supply Chain Management package and model.

Chapter 2, Data Structures, contains common recipes for creating data structure elements such as tables, enumerated data types, and extended data types. The recipes are written to patterns, guiding you through the steps you would take when creating the types of table used in Microsoft Dynamics 365 Finance and Supply Chain Management application development.

Chapter 3, Creating the User Interface, explains how to create user interface elements such as menus, forms, form parts, tiles, and workspaces. This chapter includes recipes for each of the main types of user interfaces used when creating or extending Dynamics 365 Finance and Supply Chain Management user interfaces with practical guidance and tips on how to do this efficiently.

Chapter 4, Working with Form Logic and Frameworks, helps us step into writing the business logic to handle table and form events. It then explains how to create and hook up a number sequence to a form and how to use it in a record to create dialog. It finishes with a recipe on how to update form controls at runtime.

Chapter 5, Application Extensibility, looks at extensibility, which can be said to be one of the biggest changes in Dynamics 365 Finance and Supply Chain Management. This chapter pays special attention to the key aspects of how to use extend the standard application while avoiding regression as Microsoft release updates to the base application.

Chapter 6, Writing for Extensibility, moves from using extensibility features to writing extensible code. This is done through practical examples of the use of delegates, interfaces, extension attributes, facades, and how to avoid hardcoding business rules by the use of metadata. This also covers the most important features of the SysOperation framework.

Chapter 7, Advanced Data Handling, covers more advanced data model features such as table inheritance, date-time effectiveness, and views with computed columns.

Chapter 8, Business Events, shows you how to write, implement, and process business events, an exciting new feature in Microsoft Dynamics 365 Finance and Supply Chain Management. The recipes in this chapter follow a real-world example from initial event development, Azure Service Bus setup, and configuration in Microsoft Dynamics 365 Finance and Supply Chain Management in a way to augment the standard documentation.

Chapter 9, Security, explains the security model design in Microsoft Dynamics 365 for Operations and provides recipes for the creation of the elements used in security. The recipes augment the standard documentation to provide real-world examples of how to create and model Microsoft Dynamics 365 Finance and Supply Chain Management security.

Chapter 10, Data Management, OData, and Office, focuses on data integrations that an organization can use to leverage their data stored in Microsoft Dynamics 365 Finance and Supply Chain Management. This covers writing Edit in Excel experiences, using the data import/export framework with extended data entities, and reading and writing data in Microsoft Dynamics 365 Finance and Supply Chain Management through OData.

Chapter 11, Consuming and Exposing Services, provides recipes for creating services from within Dynamics 365 Finance and Supply Chain Management, consuming external services, and also on consuming Dynamics 365 Finance and Supply Chain Management services in C# using SOAP and JSON. All this is covered using practical examples that should easily translate into your specific requirements.

Chapter 12, Unit Testing, provides recipes to show you how to create unit tests and how they are used with the application life cycle. This chapter covers an insight into test-driven development, automated unit testing on the build server, and how to write and use the new acceptance test library (atl).

Chapter 13, Automated Build Management, helps us move more into application life cycle management, providing recipes for setting up and using a build server.

Chapter 14, Workflow, covers the development of workflow approvals and tasks in Dynamics 365 Finance and Supply Chain Management. The recipes are given context by continuing to work with the sample application that is worked on through the course of this book, effectively explaining state management, which is easily misunderstood.

Chapter 15, State Machines, covers state machines, which is another new feature in Dynamics 365 Finance and Supply Chain Management. This chapter covers all key areas of this feature, explaining when and how to use this feature appropriately.

Who this book is for

If you are a software developer new to Dynamics 365 Finance and Supply Chain Management programming or an experienced software engineer migrating from its predecessor, Dynamics AX, this book is an ideal tutorial to help you avoid the common pitfalls and make the most of this advanced technology. This book is also useful if you are a solution architect or technical consultant, as it provides a deeper insight into the technology behind the solution.

In order to gain access to Microsoft Dynamics 365 for Operations, you need to be either a Microsoft partner or a Microsoft customer. To sign up for access as a partner, you can refer to Lifecycle Services (LCS) for Finance and Operations apps partners at https://docs.microsoft.com/en-us/dynamics365/operations/dev-itpro/lifecycle-services/getting-started-lcs.

To sign up for a subscription as a customer, refer to Lifecycle Services (LCS) for Finance and Operations apps customers at https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/lifecycle-services/lcs-works-lcs.

You will need to download or deploy a Dynamics 365 Finance and Supply Chain Management development virtual machine (VM) in Azure. To run the VM locally, you will need at least 100 GB free space available and a minimum of 12 GB free memory, ideally 24 GB. It can run on as little as 8 GB of assigned memory, but the performance would suffer as a result.

The official system requirements are as follows:

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

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

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

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/Extending-Microsoft-Dynamics-365-Finance-and-Supply-Chain-Management-Cookbook-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "If we wanted to create an extension of the WHSLoadTable table, it would call the WHSLoadTable.extension object by default."

A block of code is set as follows:

public Name StandardCarrierName()
{
return 'Ziriqi';
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public static ConVMSVehicleTable Find(ConVMSVehicleId _vehicleId, boolean _forUpdate = false)
{
ConVMSVehicleTable vehicle;
vehicle.selectForUdate(_forUpdate);
select firstonly * from vehicle where vehicle.VehicleId == _vehicleId;
return vehicle;
}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Right-click on 59 in the Solution Explorer and choose Properties."

Warnings or important notes appear like this.
Tips and tricks appear like this.

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, 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 you more knowledgeable about the recipe.

See also

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

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
Published in: Mar 2020Publisher: PacktISBN-13: 9781838643812
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Author (1)

author image
Simon Buxton

Simon Buxton has worked with Dynamics 365 Finance and Supply Chain Management since its earliest incarnations, starting with the product in early 1999 when Dynamics 365 Finance and Supply Chain Management was known as Damgaard Axapta 1.5. Simon has been the technical lead on many highly challenging technical projects in countries all around the world. These projects included complex integrations with on-premises and external systems, ISV solutions, and many technically challenging customer solutions. Now working with Binary, he was part of a team that implemented the first Dynamics 365 Finance and Supply Chain Management implementation as part of the Community Technical Preview (CTP) program, which led to the close working relationship with Microsoft that made this book possible
Read more about Simon Buxton