09.02.2008, 06:57 | #1 |
Участник
|
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, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|