In this post series I will show how to use Electronic Reporting (ER) to import a CSV file. This tool allows us to create new import process without a line of X++ code. It can be maintained by end users without developer’s help and does not require deployments, because can be easily transferred by XML export and import between environments.

I used documentation available, but it does not have enough details, so here I will try to explain the process step by step. We will start from a Data Model creation and go thought all the stages below:

er-overview-import.png

For simplicity, I’m going to use a custom table that has 3 fields: String, Real and Int.

TestImportTable.png

Data Model is an abstraction over destination\source tables and could be used by multiple different formats. In our case, it will be similar to destination table because it’s quite simple. To create it, go to Organization administration > Workspaces > Electronic reporting.

CSVImportModel

In the designer create model root node:

ModelRoot

Add Records List:

ModelLines.png

Now add 3 fields, one for each in a source file:

ModelFIelds

In the end you should get this structure:

DataModel

Change model status from Draft to Completed, it is required for next step.

In the next blog post we will create new Format.