How do we generate configurable business documents for our customers in Dynamics 365 for Finance and Operations? You will find only very basic documentation on Microsoft Docs, so you will need to watch quite some available webinars on the internet to get a bit of an idea.
The big advantage of configurable business documents lies clearly in the word “configurable”. Configurable business documents are not part of the software anymore, they are not a matter of development but rather of setup. Creating and updating business documents is no longer part of the software development and release process. Adding or removing fields, adjusting the document layout and formatting, changing the document data sources and designs, it can all be done at any time directly from within the D365FO production environment itself. So configurable business documents provide much more flexibility than SSRS reports and there is no more need for deployments!
The business document management audience targeted by Microsoft are business users. No knowledge of the Electronic Reporting (ER) framework is supposed to be required and as usual it is all very simple and fast… OK, back to reality! The out-of-the-box business documents hardly ever meet the customer’s requirements and the layouts usually need to be completely turned upside down. Because generating configurable business documents proves to be a quite complex and therefore time-consuming process the business user will soon hand it over to a functional consultant, who in turn will seek help from a developer because a deep understanding of the data structure is needed. Apart from that, the user experience is not yet very friendly, the design is difficult, troubleshooting is not easy and some of the features are still unstable resulting in errors like “Something went wrong, but we were able to recover your session”. Let us say there is room for improvement…
In this small series of blogs I will share my first experience with configurable business documents on a customer project and summarize and briefly explain the necessary steps to be taken. But before doing so I will try to answer the following question.
What are Configurable Business Documents?
Configurable business documents are built on top of the ER framework and basically consist of ER configurations plus templates. The following three types of reporting configurations are always involved, working closely together:
This defines the logical data tree structure with the necessary data fields as required by the business domain for which it will be used. Good examples are the Order model, Waybill model, Invoice model and Reminder model.
Data Model Mapping
This connects the data model elements with its data sources in database, classes, calculated fields, etcetera, from where the data will come at runtime.
This defines the output data tree structure for the template and its mapping to the data model. It includes templates in Excel and Word.
The data model is in fact in the center, with on the one side the mapping with the data sources and on the other side the output mapping with the format template. The flow looks like this:
At execution time the configurable business documents still use the known Print Management functionality and the SSRS execution pipeline. But instead of generating an SSRS report and sending it to an SSRS print destination, the configurable business documents flow as depicted above is executed, generating an output document and sending it to one or more ER destinations.
The main purpose of configurable business documents is to replace the SSRS reports and to make customization of business documents like order confirmations, invoices, collection letters, etcetera much easier and less costly.
Before we can make our hands dirty, we must first do some minimal configuration activities:
• Make sure that in the Feature Management workspace the following features are enabled:
o Business document management.
o Convert Electronic Reporting outbound documents from Microsoft Office formats to PDF.
• In the Electronic Reporting workspace, we create a configuration provider for our customer besides the one for Microsoft. After this we set it active and define a configuration repository for the newly created configuration provider via the Repositories link on the new tile (see picture below).
My favorite type of repository used to be LCS, because it worked fine for me to do maintenance and distribution to other environments. But recently Microsoft decided to deprecate LCS as an ER configuration storage type and now recommends us to use the Global repository instead. Via the below link in the ER workspace a special Regulatory Configuration Services environment (RCS, nothing more than a stripped down D365FO environment) can be provisioned in which the customer’s ER configurations will have to be maintained.
This forces us to move all existing business document configurations to this new provisioned environment. A migration option like for example importing these configurations directly from LCS does not exist. Another thing is that the new environment does not contain any D365FO metadata. So, in addition to the business document configurations also metadata configurations need to be created and moved over to the new environment. Hopefully, Microsoft will come up soon with a solution to support this imposed migration to RCS.
• Setup the following ER parameters:
o Set Enable design mode to Yes, otherwise we cannot do anything.
o Define a File document type and assign it on the Attachments tab.
After this has been done, we should be ready to go!
In the next blog of this series you will learn where to start and how to derive configurations, we discuss repositories and take a look at the format designer. Till next time!
Please read the other related articles on this link https://kaya-consulting.com/category/Business-Documents/