|
![]() |
#1 |
MCT
|
Цитата:
![]() https://community.dynamics.com/blogs...nts/50018.aspx
__________________
Sometimes there is a moment as you are awakening - when you become aware of the real world around you, - but you are still dreaming. - You may think you can fly but you do better not try. Последний раз редактировалось d&m; 21.09.2010 в 16:08. |
|
|
За это сообщение автора поблагодарили: mazzy (5), Vadik (1), denny (1), MikeR (1). |
![]() |
#2 |
MCT
|
импортили сегодня сотрудников (emplTable) и конечно же как всегда столкнулись с проблемой генерации Кода каталога (PartyId) при стандартном импорте через группу определений. К сожалению, в случае с сотрудниками двумя строчками в критерии импорта, как с клиентами / поставщиками, не обошлось - зато у западных коллег как всегда решение на готове (ниже приведенный код вставлять в критерий импорта в группу определений):
X++: str dirId; DirPartyTable dirPartyTable ; // Check if not associated to Party if (!emplTable.PartyId || emplTable.PartyId == "") { // Create a Party entry for customer dirId = DirParty::createPartyFromCommon(emplTable).PartyId; emplTable.PartyId = dirId; //Update the name fields on the DirPartyTable while select forupdate dirPartyTable where dirPartyTable.PartyId == emplTable.PartyId { dirPartyTable.FirstName = emplTable.Training; dirPartyTable.LastName = emplTable.EmplIdentNumber; dirPartyTable.Name = emplTable.ReqAttention; dirPartyTable.NameAlias = emplTable.ReqAttention; dirPartyTable.update(); } //Set the values in the EmplTable back to nothing emplTable.Training = ""; emplTable.EmplIdentNumber = ""; emplTable.ReqAttention = ""; } else { DirParty::updatePartyFromCommonInsert(emplTable.PartyId,EmplTable);
__________________
Sometimes there is a moment as you are awakening - when you become aware of the real world around you, - but you are still dreaming. - You may think you can fly but you do better not try. Последний раз редактировалось d&m; 21.08.2012 в 08:41. |
|
|
За это сообщение автора поблагодарили: AlGol (2), rusk (1), Atar (1), sh_boris (0). |
Теги |
ax2009, dirparty, глобальная адресная книга, документация, импорт из excel, скачать (download) |
|
|