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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.01.2019, 12:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
ievgensaxblog: MSDyn365FO. AX 2012 data upgrade with virtual companies.
Источник: https://ievgensaxblog.wordpress.com/...ual-companies/
==============

In Dynamics 365 for Finance and Operations virtual companies are deprecated and could not be upgraded according to the documentation that just state this fact without proposing a solution.

If we cannot upgrade, then we need to get rid of them. Here are the high level steps how you can de-virtualize a table. Let’s say that we have virtual company V with two companies: A and B. V has only one table collection with one table for simplicity, let’s call it Table1.

<ol>Delete a data from Table1 that belongs to the companies A and B. When you create a virtual company, you may already have some data in the tables you want to share. That data may be orphaned, so we want to delete it to avoid duplicates. Can be done via simple T-SQL script:DELETE FROM Table1WHERE DATAAREAID = 'A' or DATAAREAID = ‘B’
Go to System administration > Setup > Virtual company accounts and delete the virtual company.
Restart AX client.
Insert data from the virtual company to de-virtualized companies via X++ job:static void deVirtualizeTables(Args _args){ DataAreaId virtualDataAreaId = 'V'; container oldCompaniesCon = ['A', 'B']; VirtualDataAreaList virtualDataAreaList; void deVirtualizeTable(TableId _tableId) { int i; DataAreaId dataAreaId; SysDictTable dictTable = new SysDictTable(_tableId); Common buffer = dictTable.makeRecord(); Common newBuffer; while select crossCompany buffer where buffer.dataAreaId == virtualDataAreaId { for (i = 1; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axsa: Extensibility in Dynamics AX 2012 R3 CU8 (CRT, RetailServer, MPOS) Part 2 – New data entity Blog bot DAX Blogs 0 21.05.2015 01:19
axsa: Microsoft Dynamics AX 2012 Data Import/Export Framework standalone version for AX 2012 R2 without installing full CU7 Blog bot DAX Blogs 0 04.12.2013 04:13
emeadaxsupport: SEPA affected objects Blog bot DAX Blogs 0 29.11.2013 13:11
emeadaxsupport: Writing Data Upgrade Scripts Part 1: Understanding the components of the process Blog bot DAX Blogs 0 10.02.2012 05:16

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

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

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