Источник:
http://www.crankturner.com/2008/12/u...ctor-from.html
==============
Ok, we've made the big jump to Dynamics AX 2009! Wow, lots of work going all of the way from Axapta 3.0
One of the hurdles was dealing with the COM connector. This is no small undertaking - the COM interface has CHANGED! It was time to upgrade to the .NET business connector. After installing the .NET client dll, we are now able to connect to our servers using the .NET Business Connector. Here is an example in PowerShell.
view plaincopy to clipboardprint?
- # load the .dll (similar to the c# "Using" statement)
- [reflection.Assembly]::Loadfile("C:\Program Files\Microsoft Dynamics AX\50\Client\Bin\Microsoft.Dynamics.BusinessConnectorNet.dll") </span>
- $ax = new-object Microsoft.Dynamics.BusinessConnectorNet.Axapta
-
- # Look at the properties </span>
- # More info at: http://msdn.microsoft.com/en-us/library/aa626373.aspx </span>
- # $ax | get-member
-
- $ax.logon("","","","") </span>
- $o = $ax.CallStaticClassMethod("SysLabel","labelId2String2","@SYS21669" ) </span>
- $o # Should be "ABC" </span>
-
- # Look at some session info </span>
- $xSession = $ax.CreateAxaptaObject("XSession") </span>
- $xSession.call("AOSName") </span>
-
- $xApplication = $ax.CreateAxaptaObject("XApplication") </span>
- $xApplication.call("buildNo") </span>
-
- $ax.CallStaticClassMethod("Session", "isBusinessConnector") </span>
- $ax.CallStaticClassMethod("Session", "getAOSInstance") </span>
- $ax.CallStaticClassMethod("Session", "getAOSPort") </span>
-
- $ax.logoff()
Merry Christmas to all!
...Greg
@import url("http://greg.graham.googlepages.com/syntaxHighlighter.css");
Источник:
http://www.crankturner.com/2008/12/u...ctor-from.html