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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.03.2012, 18:35   #1  
rDenis2 is offline
rDenis2
Участник
 
62 / 36 (2) +++
Регистрация: 13.05.2010
Ax 2012. Duplicate company/Копирование компании
Добрый день,

В Ax 2012 была убрана возможность копировать существующую копманию для создания новой.
Так как большинство консультантов предпочитают создавать свои компании в приложении, появилась задача воссоздать такую фукцию.

Microsoft советует следующее:

Цитата:
Follow these steps to use an existing legal entity as a template for other legal entities.
1.
Create a legal entity to use as a template.

For more information, see Create or modify a legal entity.

2.
Set all configuration data for the legal entity.

3.
Use the Microsoft Dynamics AX data export and import feature to export the legal entity to a .dat file, such as TMP.dat.
a.
Before you export data, you must create a definition group.

For more information, see Create definition groups for import and export.

b.
To export configuration data, include the following table groups: Reference, Parameter, Group, Framework, and Miscellaneous.

To export master data, you must also include the tables that are in the Main table group.

Do not include the tables that are in the Transaction, Transaction header, Transaction line, Worksheet, Worksheet header, and Worksheet line table groups. These tables include transaction data.

For a detailed list of all the tables in a table group, see Table group reference.


4.
In the new environment, create new legal entities, and then import the .dat file that you created into each entity individually.

Shared and per-company data is imported. When other legal entities are subsequently imported into the new legal entities, the shared data is merged.

For more information, see Import data from another instance of Microsoft Dynamics AX.

http://technet.microsoft.com/en-us/l.../hh575244.aspx

там же есть немного инфомации почему это так:

Цитата:

Company, or DataArea, can no longer be used as a data security boundary. Because of changes that were made to the organization model in Microsoft Dynamics AX 2012, data is no longer related to a company or legal entity in a simple relationship that is defined by setting the SaveDataPerCompany metadata property of a table to Yes. Because data relationships are now defined through the Relations metadata property, it is not easy to duplicate all data that is related to a legal entity. Therefore, it may not make business sense to duplicate the data that is related to a legal entity. For example, we created organizational hierarchies in which legal entities and business units have a complex relationship. There is no parent/child relationship between business units and legal entities. Therefore, the duplication of business units based on legal entities in the system is erroneous.

Автоматизировать этот алгоритм не должно составить большего труда. Но возникает несколько недостатков.
1. Копируется только статическая инфомация, никаких транзакций, журналов.
2.В случае модификаций, новые таблицы должны добавляться в Definition group.

Есть идея взять за основу класс из Ax 2009 - SysSqlCopyCompany, и написать что-то подобное для 2012. Т.е. пройтись по всему AOT, проверить свойства таблиц, обработать виртуальные компании, и т.д.

Кто нибудь пытался сделать что-то подобное? Какие есть архетектурные противоречия этому, раз Microsoft этого не сделал?

С уважением,
Денис
Теги
duplicate company, копирование компании, ax2012

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicsaxtraining: Purchase Blog bot DAX Blogs 0 11.03.2012 05:25
dynamicsaxtraining: Basic concepts Blog bot DAX Blogs 0 24.02.2012 07:12
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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