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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.05.2013, 11:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
goshoom: Layer change in MorphX VCS
Источник: http://dev.goshoom.net/en/2013/05/la...in-morphx-vcs/
==============

I already posted an article about the same thing some time ago: Moving a model to another layer. The difference is that it was about Team Foundation Server, but this time I needed to move a model to another layer while using MorphX VCS.

MorphX VCS doesn’t support synchronization, therefore my original approach can’t be used. What you need is to move all objects to the target layer by export/import and update data in tables that form MorphX VCS repository. The following code will help you with the latter step:

X++:
str oldLayer = 'usr';
str newLayer = 'cus';
str 10 searchPattern = strFmt(@'\\%1\\*', oldLayer);
 
SysVersionControlMorphXItemTable item;
SysVersionControlMorphXRevisionTable rev;
SysVersionControlMorphXLockTable lock;
 
str replaceLayer(str path)
{
    return strFmt(@'\%1\%2', newLayer, subStr(path, 6, strLen(path)));
}
 
ttsBegin;
 
while select forUpdate item
    where item.ItemPath like searchPattern
{
    item.ItemPath = replaceLayer(item.ItemPath);
    item.update();
}
 
while select forUpdate rev
    where rev.ItemPath like searchPattern
{
    rev.ItemPath = replaceLayer(rev.ItemPath);        
    rev.update();
}
 
while select forUpdate lock
    where lock.ItemPath like searchPattern
{
    lock.ItemPath = replaceLayer(lock.ItemPath);        
    lock.update();
}
 
ttsCommit;

Источник: http://dev.goshoom.net/en/2013/05/la...in-morphx-vcs/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
goshoom: Code in forms Blog bot DAX Blogs 0 22.04.2013 11:11
Ограничения MorphX VCS vazerdim DAX: Программирование 4 15.06.2012 12:00
mfp: AX models - Part 4 - Working with models inside MorphX Blog bot DAX Blogs 4 26.11.2009 16:55
Morphx VCS. Что делать, если объект выгружен? dynamax DAX: Администрирование 6 07.11.2009 00:53
Контроль версий "MorphX VCS" Wamr DAX: Администрирование 10 22.06.2009 19:23

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 09:48.