AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.01.2020, 04:04   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
erconsult: Electronic reporting for data migration
Источник: http://erconsult.eu/blog/electronic-...ata-migration/
==============

Intro

There are still dozens of important tables in Dynamics 365 for Finance and SCM not exposed by any entity. Sometimes simple solutions like my Copy-paste with a keyboard script from Excel are not practical due to the volume of the complexity of the data, and sometimes there is no UI at all.

One of the notorious examples is the table EcoResCatalogControl which is associated with product attributes bound to procurement categories, see the Searchable flag in my blog Searchable product attributes. An import of these “Product category attributes” through the entity EcoResProductCategoryAttributeEntity leaves the attributes dysfunctional: the internal table EcoResCategoryAttributeLookup is left out of sync and the new attributes remain invisible in the product master.

The only form where the EcoResCatalogControl is editable and visible is the Procurement category form, but an attempt to update the flag fails with a “Missing reference” error: the systems expects the EcoResCatalogControl record to exist already. Dead end.

Electronic reporting: the last resort

Since the table browser is not an option anymore in a sandbox or production environment, the number of tools available to the consultant reduces to just one: Electronic reporting. Despite the name, the Electronic reporting module is able not only to read, but also freely insert, update or delete voluntary tables in D365FO.
In essence, the idea is to make a CSV text file and import it into the EcoResCatalogControl with the help of the Electronic reporting (ER).

This requires a so-called Mapping to destination where the “destination” is one or many tables or entities in D365FO. The concept is nicely outlined in the blog of Mr. Ties Philippi. In total, 4 “components” are required in at least 2 ER configurations (the Mapping to destination may in theory be detached into a separate – third – configuration).

ol { list-style-type: decimal; list-style-position: inside;}
  1. Model
  2. Model mapping “To destination”
  3. [CSV file] Format
  4. Model mapping [from format] ”To model”

The execution flows in the order (3) -> (4) -> (1) -> (2).
The 2 configurations I used can be downloaded here.

First, create a model, for the simplification its structure may follow exactly the table.

Next, create a mapping with the Direction = To destination. Add the target table to the right with the button Destination, then bind the model from the left to the table at the right side of the Model mapping designer. Change the status of the configuration to Complete.

Next, create a format configuration based on the model. It should describe the CSV file structure, namely a set of records (Lines) separated by CRLF, with 2 fields in every line, separated by the semicolon “;” (in a German version of the Excel; in an English version the comma “,” is more appropriate). The encoding of the CSV format should better be UTF-8 (Excel is able to produce UTF-8 encoded files).

Do not bind the format to the model, but use the button Map format to model to create a mapping of the same name. Bind the format to the model as shown on the screenshot below. The button Run can be used to test the mapping ad hoc: it takes a CSV file, interprets it according to the format definition, translates to the model internal container and exports this container to an XML file.


Once tested, update the format status to Completed. Interestingly, you start the import from the artefact (2) Model mapping to destination with the button Run. The system looks for a format based on the model the mapping belongs to, and inside of that format it looks for a “To model” mapping.

Having found an appropriate format, the system asks for an CSV file and unleashes the import, there is no way back.

Epilogue

The above crude trick works, but it is dangerous. Fixing a broken import might be a challenge, because to delete the data and start all over you need to change the destination Record action to Delete and then hope to find the right record by the primary key from the CSV file.

I would love to use standard entities, and make Microsoft add them to the application. Please vote for my 2 “favourites”:
The post Electronic reporting for data migration appeared first on ER-Consult.



Источник: http://erconsult.eu/blog/electronic-...ata-migration/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 17.01.2020, 13:13   #2  
trud is offline
trud
Участник
Лучший по профессии 2017
 
1,038 / 1629 (57) ++++++++
Регистрация: 07.06.2003
Записей в блоге: 1
Неплохо. Главное чтоб этот пост не увидели те, кто принимал решение о закрытии редактирования браузера таблиц
Старый 17.01.2020, 14:10   #3  
trud is offline
trud
Участник
Лучший по профессии 2017
 
1,038 / 1629 (57) ++++++++
Регистрация: 07.06.2003
Записей в блоге: 1
Поговаривают что на проде редактирование в нем закрыто
За это сообщение автора поблагодарили: twilight (1).
Старый 17.01.2020, 17:07   #4  
Vadik is offline
Vadik
Модератор
Аватар для Vadik
Лучший по профессии 2017
Лучший по профессии 2015
 
3,631 / 1849 (69) ++++++++
Регистрация: 18.11.2002
Адрес: гражданин Москвы
Цитата:
Сообщение от Blog bot Посмотреть сообщение
I would love to use standard entities, and make Microsoft add them to the application. Please vote for my 2 “favourites”:
Проголосовал
__________________
-ТСЯ или -ТЬСЯ ?
За это сообщение автора поблагодарили: EVGL (5).
Старый 17.01.2020, 17:32   #5  
EVGL is offline
EVGL
Banned
Соотечественники
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
4,445 / 3001 (0) ++++++++++
Регистрация: 09.07.2002
Адрес: Parndorf, AT
Цитата:
Сообщение от trud Посмотреть сообщение
Неплохо. Главное чтоб этот пост не увидели те, кто принимал решение о закрытии редактирования браузера таблиц.
Я тоже об этом думал, когда писал.
Но возможность писать в таблицы - интегральная часть итальянских и испанских интерфейсов, так что убрать фичу не получится.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
erconsult: Electronic Reporting (ER) Cookbook 3: Working with dates Blog bot DAX Blogs 0 07.10.2019 16:48
erconsult: Electronic reporting: Italian eInvoicing FatturaPA, CIG and CUP numbers, RIBA Blog bot DAX Blogs 0 10.04.2019 12:11
erconsult: Electronic Reporting (ER) Cookbook 2: new tips from the kitchen Blog bot DAX Blogs 0 06.08.2018 17:11
erconsult: Electronic Reporting (ER) Cookbook Blog bot DAX Blogs 24 09.10.2017 08:47
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 02:08.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.