开发者

How to convert from AX data (container) to C# collection

开发者 https://www.devze.com 2023-01-29 08:09 出处:网络
It is possible to convert data from axapta container开发者_StackOverflow社区 to a C# collection like ArrayList, or maybe serialize and deserialize from one to another?There is no direct conversion, bu

It is possible to convert data from axapta container开发者_StackOverflow社区 to a C# collection like ArrayList, or maybe serialize and deserialize from one to another?


There is no direct conversion, but you can address each member of the container:

using Microsoft.Dynamics.BusinessConnectorNet;
AxaptaContainer axContainer = (AxaptaContainer)objDAXCn.Call("someClass","someStaticMethod",Var1,Var2,var3);    
for (int i = 1; i <= axContainer.Count; i++)
{ 
    someStr = axContainer.get_Item(i).toString();
}

Reference: http://dynamics-ax.blogspot.com/2007/06/net-bc-custom-app-part-iii-container.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号