MSDyn365FO. How to Import CSV file using Electronic Reporting. Part 4 – Map Model to Datasource.

That’s the last step. We have Format to parse data to a model, now we need to write data from model back to actual tables. Open model designer and click “Map model to datasource” in the action pane.

Create new record, set name and description. Select direction, for import it should be “To destination”:


Open designer. In the Data Sources area add data model:


Set name, select model and definition:


Add new destination:


Select table you want to insert to, set name, specify if it should support insert or update\insert and if you need validation to be triggered:


Bind Record List from model to tables’ record list and bind field accordingly:


Save and we are ready to test it!

Go back to Model to Datasource mapping screen, select mapping record and click run in the action pane:


Select file and check the result. I do not have UI for this table, so just going to use table browser:


It’s not that nice to trigger import from the mapping record but that’s the only way I know and in the next post we will look how to trigger it from X++ code, so we could have a button somewhere.

As you can see ER is a really powerful tool that allows users to do tasks that were not possible without development before.

6 thoughts on “MSDyn365FO. How to Import CSV file using Electronic Reporting. Part 4 – Map Model to Datasource.

  1. Oleg July 2, 2019 / 7:34 am

    Hi Ievgen, thanks for all the articles about the ER. Very helpful! I just wonder if you have already published an article about how to trigger ER from code (X++)? If yes, could you provide the link?

  2. Oleg July 11, 2019 / 7:40 am

    Hi Ievgen, I just wonder whether have you investigated functionality design formulas, or not? For example, if you have such a line of code in ax “TaxRegistration::legislationRegistrationValue(DirPartyTable::findByName(OfficialsTable_RU::findAccountant().Name, DirPartyType::Person).RecId, TaxRegistrationTypesList::OKPO);” which include embedded table methods with parameters, how should it looks in the formulas designer for ER or there is no possibility to use formulas designer in such a way? Because MS gives a poor description of using this capability –
    Thanks for your reply

    • Ievgen Miroshnikov July 11, 2019 / 9:55 am

      Unfortunately, I have not tried to chain methods like you want. I would recommend you to go and ask this question on yammer or community forum where you can reach more people.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s