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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.02.2008, 06:57   #1  
Blog bot is offline
Blog bot
Участник
 
25,497 / 847 (79) +++++++
Регистрация: 28.10.2006
axStart: Make country configuration key company depended.
Источник: http://axstart.spaces.live.com/Blog/...C0A0!256.entry
==============


When we enable multiple country configuration keys (CRSEcountry). The configuration key is enabled for all countries. This means that for example Belgium Law requirements influence German Law requirements. For a lot of those country specific configuration keys, no additional security keys are defined. However it is still possible to enable configuration key in relation to there company.
In AX most configuration checks in classes are done by this method in the global class
static boolean isConfigurationkeyEnabled(configurationKeyId configurationkey)
{
    DictConfigurationKey dictConfigurationKey = new DictConfigurationKey(configurationkey);
    if (dictConfigurationKey && !dictConfigurationKey.enabled())
        return false;
    return true;
}
It is possible to make above code also company depended. We can do this by adding the field configurationKeyId to the company table.
static boolean isConfigurationkeyEnabled(configurationKeyId configurationkey)
{
    DictConfigurationKey dictConfigurationKey = new DictConfigurationKey(configurationkey);
    if (dictConfigurationKey && !dictConfigurationKey.enabled())
        return false;
       
    if(dictConfigurationKey.parentConfigurationKeyId() == configurationkeynum(CRSECountry) &&
      companyinfo::find().configurationKeyId != configurationkey)
      return false;
 
    return true;
}
I used this trick on a project in Axapta 3.0 where we had to merge Europe, USA, Canada, Mexico and Australia.


Источник: http://axstart.spaces.live.com/Blog/...C0A0!256.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axStart: Import 3.0 company data into 4.0 Blog bot DAX Blogs 0 31.01.2008 20:50
axStart: AXC configuratied SharePoint AX configuration. Blog bot DAX Blogs 0 17.01.2008 03:30
Inside Dynamics AX 4.0: Licensing and Configuration Blog bot DAX Blogs 0 31.10.2007 11:40
при построении перекрёстных ссылок выдаётся сообщение об ошибках mmmax DAX: Программирование 10 21.01.2005 12:42
Configuration key в EDT Hezl DAX: Программирование 4 04.08.2004 11:53

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

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

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