Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Dynamics 365 for Finance and Operations Development Cookbook
Dynamics 365 for Finance and Operations Development Cookbook

Dynamics 365 for Finance and Operations Development Cookbook: Recipes to explore forms, look-ups and different integrations like Power BI and MS Office for your business solutions , Fourth Edition

Arrow left icon
Profile Icon Abhimanyu Singh Profile Icon Agarwal
Arrow right icon
$35.99 $51.99
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.7 (3 Ratings)
eBook Aug 2017 480 pages 4th Edition
eBook
$35.99 $51.99
Paperback
$65.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Abhimanyu Singh Profile Icon Agarwal
Arrow right icon
$35.99 $51.99
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.7 (3 Ratings)
eBook Aug 2017 480 pages 4th Edition
eBook
$35.99 $51.99
Paperback
$65.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$35.99 $51.99
Paperback
$65.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Dynamics 365 for Finance and Operations Development Cookbook

Working with Forms

In this chapter, we will cover the following recipes:

  • Creating dialogs using the RunBase framework
  • Handling the dialog event
  • Creating dialogs using the SysOperation framework
  • Building a dynamic form
  • Adding a form splitter
  • Creating a modal form
  • Modifying multiple forms dynamically
  • Storing the last form values
  • Using a Tree control
  • Adding the View details link
  • Selecting a Form Pattern
  • Full list of form patterns
  • Creating a new form

Introduction

Forms in Dynamics 365 for Finance and Operations represent the user interface and are mainly used to enter or modify data. They are also used to run reports, execute user commands, validate data, and so on.

Normally, forms are created using the AOT by producing a form object and adding form controls, such as tabs, tab pages, grids, groups, data fields, and images. The form's behavior is controlled by its properties or the code in its member methods. The behavior and layout of form controls are also controlled by their properties and the code in their member methods. Although it is very rare, forms can also be created dynamically from code.

In this chapter, we will cover various aspects of using Dynamics 365 for Finance and Operations forms. We start by building Dynamics 365 for Finance and Operations dialogs, which are actually dynamic forms, and then go on to...

Creating dialogs using the RunBase framework

Dialogs are a way to present users with a simple input form. They are commonly used for small user tasks, such as filling in report values, running batch jobs, and presenting only the most important fields to the user when creating a new record. Dialogs are normally created from X++ code without storing the actual layout in the AOT.

The application class called Dialog is used to build dialogs. Other application classes, such as DialogField, DialogGroup, and DialogTabPage, are used to create dialog controls. The easiest way to create dialogs is to use the RunBase framework. This is because the framework provides a set of predefined methods, which make the creation and handling of the dialog well-structured, as opposed to having all the code in a single place.

In this example, we will demonstrate how to build a dialog from code using...

Handling the dialog event

Sometimes, in the user interface, it is necessary to change the status of one field depending on the status of another field. For example, if the user marks the Show filter checkbox, then another field, Filter, appears or becomes enabled. In AOT forms, this can be done using the modified() input control event. However, if this feature is required on runtime dialogs, handling events is not that straightforward.

Often, existing dialogs have to be modified in order to support events. The easiest way to do this is, of course, to convert a dialog into an AOT form. However, when the existing dialog is complex enough, a more cost-effective solution would probably be to implement dialog event handling instead of converting into an AOT form. Event handling in dialogs is not flexible, as in the case of AOT forms; but in most cases, it does the job.

In this recipe...

Creating dialogs using the SysOperation framework

SysOperation is a framework in Dynamics 365 for Finance and Operations that allows application logic to be written in a way that supports running operations interactively or via the D365 batch server. The SysOperation framework follows the MVC (Model-View-Controller) pattern. As the name implies, the MVC pattern isolates the Model, View, and Controller components, which makes the process loosely coupled built over the SysOperation framework. Depending on parameters, the controller can execute different service operations under four main execution modes. Regardless of which mode a service is running in, the code runs on a server. This makes the minimum number of round trips between server and client.

  • Synchronous: When a service is run in synchronous mode, although it runs on a server, it freezes the Dynamics 365 for Operations...

Building a dynamic form

A standard approach to creating forms in Dynamics 365 for Finance and Operations is to build and store form objects in the AOT. It is possible to achieve a high level of complexity using this approach. However, in a number of cases, it is necessary to have forms created dynamically. In a standard Dynamics 365 for Finance and Operations application, we can see that application objects, such as the Table browser form, various lookups, or dialogs, are built dynamically. Even in Dynamics 365 for Finance and Operations, where we have a browser-based interface, every form or dialog opens in a browser only.

In this recipe, we will create a dynamic form. In order to show how flexible the form can be, we will replicate the layout of the existing Customer groups form located in the Accounts receivable module. The Customers form can be opened by navigating to Accounts...

Adding a form splitter

In Dynamics 365 for Finance and Operations, complex forms consist of one or more sections. Each section may contain grids, groups, or any other element. In order to maintain section sizes while resizing the form, the sections are normally separated by so-called splitters. Splitters are not special Dynamics 365 for Finance and Operations controls; they are Group controls with their properties modified so that they look like splitters. Most of the multisection forms in Dynamics 365 for Finance and Operations already contain splitters.

In this recipe, in order to demonstrate the usage of splitters, we will modify one of the existing forms that does not have a splitter. We will modify the Account reconciliation form in the Cash and bank management module. You can open this module by navigating to Cash and bank management | Setup | Bank group. From the following...

Creating a modal form

Often, people who are not familiar with computers and software tend to get lost among open application windows. The same can be applied to Dynamics 365 for Finance and Operations. Frequently, a user opens a form, clicks a button to open another one, and then goes back to the first one without closing the second form. Sometimes this happens intentionally, sometimes not, but the result is that the second form gets hidden behind the first one and the user starts wondering why it is not possible to close or edit the first form.

Although it is not best practice, sometimes such issues can be easily solved by making the child form a modal window. In other words, the second form always stays on top of the first one until it is closed. In this recipe, we will make a modal window from the Create sales order form.

...

Modifying multiple forms dynamically

In the standard Dynamics 365 for Finance and Operations, there is a class called SysSetupFormRun. The class is called during the run of every form in Dynamics 365 for Operations; therefore, it can be used to override one of the common behaviors for all Dynamics 365 for Finance and Operations forms. For example, different form background colors can be set for different company accounts, some controls can be hidden or added depending on specific circumstances, and so on.

In this recipe, we will modify the SysSetupFormRun class to automatically add the About Dynamics 365 for Operations button to every form in Dynamics 365 for Finance and Operations.

How to do it...

Carry out the following...

Storing the last form values

Dynamics 365 for Finance and Operations has a very useful feature that allows you to save the latest user choices per user per form, report, or any other object. This feature is implemented across a number of standard forms, reports, periodic jobs, and other objects which require user input. When developing a new functionality for Dynamics 365 for Finance and Operations, it is recommended that you keep it that way.

In this recipe, we will demonstrate how to save the latest user selections. In order to make it as simple as possible, we will use the existing filters on the Bank statement form, which can be opened by navigating to Cash and bank management | Common | Bank accounts, selecting any bank account, and then clicking on the Account reconciliation button in the Action pane. This form contains one filter control called View, which allows you to...

Using a tree control

Frequent users will notice that some of the Dynamics 365 for Finance and Operations forms use tree controls instead of the commonly used grids. In some cases, this is extremely useful, especially when there are parent-child relationships among records. It is a much clearer way to show the whole hierarchy, as compared to a flat list. For example, product categories are organized as a hierarchy and give a much better overview when displayed in a tree layout.

This recipe will discuss the principles of how to build tree-based forms. As an example, we will use the Budget model form, which can be found by navigating to Budgeting | Setup | Basic Budgeting | Budget models. This form contains a list of budget models and their submodels and, although the data is organized using a parent-child structure, it is still displayed as a grid. In this recipe, in order to demonstrate...

Adding the View details link

Dynamics 365 for Finance and Operations has a very useful feature that allows the user to open the main record form with just a few mouse clicks on the current form. The feature is called View details and is available in the right-click context menu on some controls. It is based on table relationships and is available for those controls whose data fields have foreign key relationships with other tables.

Because of the data structure's integrity, the View details feature works most of the time. However, when it comes to complex table relations, it does not work correctly or does not work at all. Another example of when this feature does not work automatically is when the display or edit methods are used on a form. In these and many other cases, the View details feature has to be implemented manually.

In this recipe, to demonstrate how it works...

Selecting a form pattern

In the latest version of Dynamics 365 for Finance and Operations, form patterns are now an integrated part of the form development experience. These patterns provide form structure based on a particular style (including required and optional controls), and also provide many default control properties. In addition to top-level form patterns, Dynamics 365 for Operations has also introduced subpatterns which can be applied to container controls, and that provide guidance and consistency for subcontent on a form, such as, on a Fast Tab.

Form patterns have made form development easier in Dynamics 365 for Finance and Operations by providing a guided experience for applying patterns to forms to guarantee that they are correct and consistent. Patterns help validate form and control structures, and also the use of controls in some places. Patterns also help guarantee...

Full list of form patterns

In the current version of Dynamics 365 for Finance and Operations, there are a total of five form patterns that we use the most:

  • Details Master
  • Form Part - Fact Boxes
  • Simple List
  • Table of Contents
  • Operational workspaces

For a full list of the forms that are currently using a particular form pattern, generate the Form Patterns report from within Microsoft Visual Studio. On the Dynamics 365 menu, expand the Add-ins option, and click Run form patterns report. A background process generates the report. After several seconds, a message box appears in Visual Studio to indicate that the report has been generated and inform you about the location of the Form Patterns report file. You can filter this file by pattern to find forms that use a particular pattern.

How...

Creating a new form

In Dynamics 365 for Finance and Operations, form creations are slightly easier than in AX2012 and earlier versions. Here, we have more tools to create any specific form using design templates. Every form plays an important role where we need to interact with the user to view, insert, update, or delete any record(s).

In this recipe, we will create a simple form using a template and add this form to one of the menus so that users can access it from the front end.

Getting ready

Let's think about a scenario where the admin needs to check all existing users in the system. Although we have one standard form for this, we cannot give access to everyone because this form also has many other options to perform...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn all about the enhanced functionalities of Dynamics 365 for Finance and Operations and master development best practices
  • Develop powerful projects using new tools and features
  • Work through easy-to-understand recipes with step-by-step instructions and useful screenshots

Description

Microsoft Dynamics 365 for Finance and Operations has a lot to offer developers. It allows them to customize and tailor their implementations to meet their organization’s needs. This Development Cookbook will help you manage your company or customer ERP information and operations efficiently. We start off by exploring the concept of data manipulation in Dynamics 365 for Operations. This will also help you build scripts to assist data migration, and show you how to organize data in forms. You will learn how to create custom lookups using Application Object Tree forms and generate them dynamically. We will also show you how you can enhance your application by using advanced form controls, and integrate your system with other external systems. We will help you script and enhance your user interface using UI elements. This book will help you look at application development from a business process perspective, and develop enhanced ERP solutions by learning and implementing the best practices and techniques.

Who is this book for?

If you are a Dynamics AX developer primarily focused on delivering time-proven applications, then this book is for you. This book is also ideal for people who want to raise their programming skills above the beginner level, and at the same time learn the functional aspects of Dynamics 365 for Finance and Operations. Some X++ coding experience is expected.

What you will learn

  • Explore data manipulation concepts in Dynamics 365 for Operations
  • Build scripts to assist data migration processes
  • Organize data in Dynamics 365 for Operations forms
  • Make custom lookups using AOT forms and dynamically generate them from X++ code
  • Create a custom electronic payment format and process a vendor payment using it
  • Integrate your application with Microsoft Office Suite and other external systems using various approaches
  • Export and import business data for further distribution or analysis
  • Improve your development efficiency and performance

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 11, 2017
Length: 480 pages
Edition : 4th
Language : English
ISBN-13 : 9781786466112
Vendor :
Microsoft
Languages :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 11, 2017
Length: 480 pages
Edition : 4th
Language : English
ISBN-13 : 9781786466112
Vendor :
Microsoft
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 192.97
Implementing Microsoft Dynamics 365 for Finance and Operations
$65.99
Dynamics 365 for Finance and Operations Development Cookbook
$65.99
Extending Microsoft Dynamics 365 for Operations Cookbook
$60.99
Total $ 192.97 Stars icon
Banner background image

Table of Contents

10 Chapters
Processing Data Chevron down icon Chevron up icon
Working with Forms Chevron down icon Chevron up icon
Working with Data in Forms Chevron down icon Chevron up icon
Building Lookups Chevron down icon Chevron up icon
Processing Business Tasks Chevron down icon Chevron up icon
Data Management Chevron down icon Chevron up icon
Integration with Microsoft Office Chevron down icon Chevron up icon
Integration with Power BI Chevron down icon Chevron up icon
Integration with Services Chevron down icon Chevron up icon
Improving Development Efficiency and Performance Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.7
(3 Ratings)
5 star 33.3%
4 star 0%
3 star 0%
2 star 33.3%
1 star 33.3%
Carlos Díaz Aug 12, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Me está ayudando en mi trabajo actual y futuro. Me gustó el tiempo de entrega y respuesta
Amazon Verified review Amazon
DNAunion Apr 28, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I am so sick of Packt books. Not even 10 pages in reading and there are multiple errors. These books are so unprofessional; almost like authors just slap them together in a hurry to get them out the door, and don't bother to proofread the work themselves or have anyone else proofread it. If these authors and the publisher aren't going to take the time to worry about what they put out, then we shouldn't worry about what they put out and just not buy their books any more.
Amazon Verified review Amazon
Milindav Aug 31, 2018
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I did not buy this book - nor did I read it. However, I was trouble-shooting an error that a user had in their Dynamics 365 for Finance and Operations environment. The reader (a developer) followed the step by step guidelines provided in the book. She had created a PowerBI report using a direct reference to the Operational database (AXDB). She was facing errors when migrating the report from her Developer environment to the production environment.This approach prescribed in the book is wrong. User must not reference the operational database directly. User must reference Entity store. Perhaps it's a typo.I am posting this comment for awareness. And perhaps the author can change the issue in the next edition
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.