Site icon Dynamics Manuals

Electronic Reporting in Depth, Format Mapping part 1 – General

1 chuttersnap fN603qcEA7g unsplash

1 chuttersnap fN603qcEA7g unsplash

This blog post will explain the concept of the format mapping in Electronic Reporting. After this blog post you should have a general idea on how to create a format mapping and the types of format mappings present in Electronic Reporting.

This post assumes that you are familiar with the basics of Electronic Reporting and that you have a good understanding of data models and model mappings. Due to the size and complexity of a format mapping this topic will be split up into multiple posts.

In this post we will focus on creating an import and export format mapping, creating attachments and the general setup required for using these attachments and mappings.

Format mapping – General

As we have seen in our previous post about model mappings the format mapping is the binding of the format destination or source (the file) to the data model. Setting up a new Electronic Reporting configuration requires you to follow the order Data model, to Model Mapping, to Format Mapping.

ER Model drawing v2

The format mapping is the configuration component which determines the type of input or output file. Because of this characteristic the configuration components and use differ slightly per file type you are configuring, this is something that will be covered in future blog posts. On top of this configuring a format for import requires a different approach in setup than a format for export. Another feature is that you can write back information into Dynamics 365 for Finance and Operations based upon the exported data, this can be very useful but complex in set up as well.

Creating an Export Format Mapping

To create a new export format mapping select a data model you want to create a format mapping in and click on <create configuration>.

Create Configuration

Then select the radio button <Format based on data model XYZ> and enter a name.

The description is optional but recommended to fill in and for an export format you are required to select the Data model definition you are basing the export format on.

Leave the format type empty, this is intended for import formats and selecting a format type will limit the choices you have later in the format editor and leave Supports Import on No as well.

The data model version is optional to fill in, but I recommend keeping it empty as Electronic Reporting will fill in the latest version by default.

Create new export format mapping

Click on Create configuration to create your new Export Format Mapping.

Creating an Import Format Mapping

The creation of an import format mapping is much like an Export Format Mapping click on <create configuration>.

Create new import format mapping

Again, select the radio button <Format based on data model XYZ>, and enter a name and an optional description. Set the radio button for supports data import to yes and determine a file format type you will be importing.

Supported import file types

Although the file format type is not mandatory, it is recommended to fill in as imports are not run from the format mapping but from the model mapping. Because there can be multiple import format’s pointing at the same model mapping, this format type field tells Electronic Reporting which format mapping to use for which file type. Besides this, the file type filters the available options in the mapping designer as well, making configuration a little bit easier because of the cleaner drop downs. Click on create configuration to create the import mapping.

Attachments

Electronic reporting supports different file types for importing data and exporting data. The format mapping is the configuration which determines the file type. When exporting files, a file is created, and its contents are mapped by this configuration. When exporting data to a text-based file (JSON, XML, Other Text), Electronic Reporting can facilitate creating the file and performing the mapping of the data.

However, when exporting data to a file which is not text-based (Excel, Word, PDF), Electronic Reporting can’t create the file and requires a template file to which the data is mapped. This template file is added as an attachment to the format mapping configuration.

The attachments are opened from the attachment button on the format configuration, note that this is a different menu to the regular attachment window (marked purple).

Attachments
Attachments overview

To create a new attachment, click on the new button and select the document type you have configured in the parameters. In this window you will see the attachments available in the format mapping configuration. When you have added an attachment as a template for a format configuration, you will have to map this template in the configuration designer as well.

Designer template mapping

Parameters for attachments

When creating a new attachment, you have the option to select out of all available document types. However, even if you can attach all the document types to a format configuration, only the file type configured under the Electronic Reporting Parameters will show up in the template dropdown in the format designer.

Parameters Attachments

The document type that is relevant for this is the Configurations document type. As you can see in the screenshot above, I have changed this to DM_ER_Templates.

Conclusion

You now should be able to understand the creation of a new import and export format configuration. Besides this you should be familiar with the concept of template-based configurations and text-based configurations and you understand the parameter setup required for this.

Stay tuned for the next blog post, in which we will cover the designer menu overview.  

Exit mobile version