Академический Документы
Профессиональный Документы
Культура Документы
DynamicsAx2012AIFImportCSVFilePart1:ConsumeWebservice| Shashi'sAx.NetSpace
I will start a series for AIF 2012 to use the Inbound port file adapter settings structured:
Part 1: Consume Web Service
Part 2: Create Item from File adapter
Part 3: Import CSV file with items Through AIF
The aim is to start from a web service to consume an AIF service, and then move that to a file system
adapter. I will that take that a step further by adding a .Net transformation library so that we can import
a CSV file to do the same. Allthroughoutthe process, there will be no change done within Dynamics Ax
itself.
The service I am going to consumethroughoutthe series is the InventItemService, and i will create an
item.
With AX2012, we need to create a product and then release it. So for this demonstration, I will assume
that the Products have been created, but have not been released yet.The AIF webservice
InventItemService.create will do this for us.
https://shashidotnet.wordpress.com/2011/04/11/dynamicsax2012aifimportcsvfilepart1consumewebservice/
1/5
4/11/2015
DynamicsAx2012AIFImportCSVFilePart1:ConsumeWebservice| Shashi'sAx.NetSpace
staticvoidMain(string[]args)
{
//InitialisetheService
using(LoonItemService.ItemServiceClientclient=newLoonItemService.ItemServiceClient()
{
//Initizliseparametersusedforthecreatemethod
LoonItemService.CallContextcallContext=newLoonItemService.CallContext(){Company
LoonItemService.AxdItemaxdItem=newLoonItemService.AxdItem();
LoonItemService.AxdEntity_InventTableinventTable=newLoonItemService.AxdEntity_Inv
inventTable.ItemId="SS001";
inventTable.NameAlias="SS001NAMEAlias";
inventTable.Product="SS001";
ListlstInventTable=newList();
lstInventTable.Add(inventTable);
axdItem.InventTable=lstInventTable.ToArray();
//CalltheAIFcreatemethod
varresult=client.create(callContext,axdItem);
//Displaytheresult
foreach(variteminresult)
{
foreach(vardatainitem.KeyData)
{
Console.WriteLine(string.Format("{0}:{1}",data.Field,data.Value));
}
}
}
}
https://shashidotnet.wordpress.com/2011/04/11/dynamicsax2012aifimportcsvfilepart1consumewebservice/
2/5
4/11/2015
DynamicsAx2012AIFImportCSVFilePart1:ConsumeWebservice| Shashi'sAx.NetSpace
For a more detailed process on how to use the inventItemService.create look at this link: How to create
an item using ItemServices and EcoResProductServices in AX 2012
On Running the code above, the Item is displayed in the Console, and if you check AX, the item SS001 is
now a part of the Released products.
Share this:
Like
Bethefirsttolikethis.
Related
https://shashidotnet.wordpress.com/2011/04/11/dynamicsax2012aifimportcsvfilepart1consumewebservice/
3/5
4/11/2015
DynamicsAx2012AIFImportCSVFilePart1:ConsumeWebservice| Shashi'sAx.NetSpace
Pingback: Dynamics Ax 2012 AIF Import CSV File Part 2: Create Item from File adapter Shashi's
Ax.Net Space
Pingback: Dynamics Ax 2012 AIF Import CSV File Part 3: Import CSV file using AIF Shashi's Ax.Net
Space
Pingback: Import CSV files using AIF - Palle Agermark on AX - AX Technical Blogs - Microsoft Dynamics
Community
Pingback: Ebbes Nrderi (Ebbes Nerdery) Blog Archive Import using AIF
Pingback: Dynamics Ax 2012 AIF Import CSV File - Mukesh Hirwani - Microsoft Dynamics AX - AX
Technical Blogs - Microsoft Dynamics Community
Pingback: Dynamics Ax 2012 AIF Import CSV File Part 3: Import CSV file using AIF - Shashis Microsoft
Dynamics Ax Blog - AX Technical Blogs - Microsoft Dynamics Community
https://shashidotnet.wordpress.com/2011/04/11/dynamicsax2012aifimportcsvfilepart1consumewebservice/
4/5
4/11/2015
DynamicsAx2012AIFImportCSVFilePart1:ConsumeWebservice| Shashi'sAx.NetSpace
Pingback: Dynamics Ax 2012 AIF Import CSV File Part 2: Create Item from File adapter - Shashis
Microsoft Dynamics Ax Blog - AX Technical Blogs - Microsoft Dynamics Community
https://shashidotnet.wordpress.com/2011/04/11/dynamicsax2012aifimportcsvfilepart1consumewebservice/
5/5