Показать сообщение отдельно
Старый 06.02.2019, 07:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
ievgensaxblog: MSDyn365FO. How to Import CSV file using Electronic Reporting. Part 4 – Map Model to Datasource.
Источник: https://ievgensaxblog.wordpress.com/...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.



Источник: https://ievgensaxblog.wordpress.com/...to-datasource/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.