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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.08.2009, 14:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,631 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: How to set the number sequence for Global Address Book when virtual companies are used
Источник: http://blogs.msdn.com/emeadaxsupport...-are-used.aspx
==============

In global address book parameters a number sequence and a company must be selected to use for Global Address Book (GAB) entries.
In our scenario we have 70 companies. We do not have a single company which ALL users have access to, so it seems we cannot pick a company to use for the number sequence.
We also share the number sequence tables through a virtual company, across all 70 real companies.

The result is that we cannot configure Global Address Book.

This is because users must have access to the company which is used for the Global Address Book number sequence, to be able to create new GAB entries.
Global address book parameters number sequence does not account for sharing of the number sequence tables out of the box.

So as standard it would be necessary to create a company to use for GAB which user's can access, and set up the number sequence in this company.
In this example as we are sharing the number sequence table (Tables\NumberSequenceTable), so we alreadey have a virtual company which everyone has access to with the number sequences in it, so we will need to change the X++ used to find the next DirPartyId so that it doesn't try and use a company specific number sequence.
I've given a code example for this change below, this is for Tables\DirPartyTable.getNewPartyId():

X++:
static DirPartyId getNewPartyId(boolean _throwError = true)
{ 
  NumberSequenceReference numberSequenceReference;
  DirParameters dirParameters; 
  SysInfoAction_MenuFunction sysInfoAction = SysInfoAction_MenuFunction::newMenuItem(menuitemdisplaystr(DirParameters),MenuItemType::Display);
  NumberSeq numberSeq; 
  DirPartyId partyId; 
  dataAreaId numSeqCompanyId;
  container dataAreaIdList; 
  ; 
  dirParameters = DirParameters::find();
  numSeqCompanyId = dirParameters.NumSeqCompanyId;
  // START 
  // changecompany (numSeqCompanyId)
  // { 
  numberSequenceReference = DirParameters::numRefDirPartyId();
  if (numberSequenceReference) 
  { 
    numberSeq = NumberSeq::newGetNum(numberSequenceReference, false,true);
  } 
  if (numberSeq) 
  { 
    partyId = numberSeq.num();
  } 
  // } END
  if (!numberSeq && _throwError)
  { 
    dataAreaIdList = [numSeqCompanyId];
    select firstonly crosscompany:dataAreaIdList dirParameters;
    sysInfoAction.parmCallerBuffer(dirParameters); 
    throw error(strfmt("@SYS53911",fieldid2pname(tablenum(DirPartyTable),fieldnum(DirPartyTable,PartyId)),enum2str(NumberSeqModule::DIR)),'',sysInfoAction); 
  } 
  return partyId;
}
You will also need to make sure that the records you intend to use in Tables\NumberSequenceTable and Tables\NumberSequenceReference have the virtual company's ID associated with them and not one of the specific companies.
With this change it means that the value in numSeqCompanyId is no longer used so it doesn't matter what it is.



Источник: http://blogs.msdn.com/emeadaxsupport...-are-used.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
global address book, number sequence, виртуальные компании

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Building a Self-Contained Virtual CRM Development Server Blog bot Dynamics CRM: Blogs 0 05.05.2009 10:05
Microsoft Dynamics AX 2009 White Paper: Extending Default Cubes for Virtual Companies Vadik DAX: База знаний и проекты 0 31.03.2009 09:56
epblog: How to update Data Set from User Control? Blog bot DAX Blogs 0 21.06.2008 13:05
daxcoder: Number Sequence Framework Part I Blog bot DAX Blogs 0 31.01.2008 15:00
Говорят вышел SP2 для Axapta 3. Кто нибуть что знает на эту тему? soin DAX: Прочие вопросы 10 13.10.2003 10:43

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

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

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