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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.09.2018, 21:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
d365technext: Create Vendor using X++ D365FO & AX-2012
Источник: http://d365technext.blogspot.com/201...o-ax-2012.html
==============


Create Vendor using X++ D365FO & AX-2012



Following Code will help you to create Vendor using X++


For Default Dimension please check Link


publicclassVendorHelper
{









privatevoidnew()
{
}


publicstaticVendorHelper construct()
{
returnnewVendorHelper();
}


publicvoid createVendor()
{
VendTable vendTable;
NumberSeq numberSeq;
Name name ='Systems Limited Karachi, Pakistan';


DirParty dirParty;
DirPartyPostalAddressView dirPartyPostalAddressView;
DirPartyContactInfoView dirPartyContactInfo;
;
container conAttribute=["BusinessUnit","CostCenter","Department"];
container conAttributeValue=["001","007","022"];
/* Marks the beginning of a transaction.
Necessary to utilize the method numRefCustAccount() */
ttsBegin;
vendTable.initValue();


try
{
//vendTable
//numberSeq = NumberSeq::newGetNum(VendParameters::numRefVendAccount())
// vendTable.AccountNum = numberSeq.num();
vendTable.AccountNum = "Vend-00099";
vendTable.VendGroup ='30';
vendTable.Currency ='USD';
vendTable.PaymTermId ='Net10';
vendTable.PaymMode ='CHECK';
vendTable.DefaultDimension=DefaultDimesnionHelper::createDefaultDimension(conAttribute,conAttributeValue);
vendTable.insert();


//DirParty


/* Creates a new instance of the DirParty class from an address book entity
that is represented by the custTable parameter. */
dirParty = DirParty::constructFromCommon(vendTable);


dirPartyPostalAddressView.LocationName ='Systems limited Karachi, Pakistan ';
dirPartyPostalAddressView.City ='Karachi';
dirPartyPostalAddressView.Street ='Shah-re-faisal alcope-house';
dirPartyPostalAddressView.StreetNumber ='18';
dirPartyPostalAddressView.CountryRegionId ='PAK';
dirPartyPostalAddressView.State ='Sindh';
dirPartyPostalAddressView.IsPrimary = NoYes::Yes;
// Fill address
dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView);




dirPartyContactInfo.LocationName ='Email Address';
dirPartyContactInfo.Locator ='ShaikhSohailHussain@gmail.com';
dirPartyContactInfo.Type = LogisticsElectronicAddressMethodType::Email;
dirPartyContactInfo.IsPrimary = NoYes::Yes;


// Fill Contacts
dirParty.createOrUpdateContactInfo(dirPartyContactInfo);




dirPartyContactInfo.LocationName ='Mobile Number';
dirPartyContactInfo.Locator ='923422722538';
dirPartyContactInfo.Type = LogisticsElectronicAddressMethodType::Phone;
dirPartyContactInfo.IsPrimary = NoYes::Yes;


// Fill Contacts
dirParty.createOrUpdateContactInfo(dirPartyContactInfo);


// Marks the end of transaction.
ttsCommit;
}
catch(Exception::Error)
{
ttsAbort;
throwException::Error;
}
}


}


Источник: http://d365technext.blogspot.com/201...o-ax-2012.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
d365technext: Environment Hot-Fixes List Using X++ D365FO & AX 7 Blog bot DAX Blogs 0 02.08.2018 18:12
dynamicsaxse: February release – Dynamics AX 2012 R3 Blog bot DAX Blogs 0 02.03.2017 01:11
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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