Monday, 16 December 2013

.NET Proxies (Alternative to .NET Business Connector) in Dynamics AX 2012


If you recall in older versions of dynamics ax, .NET Business connector is used to integrate Microsoft applications with dynamics ax.
In Dynamics AX 2012 , they come up with an alternative to .NET Business connector called as .NET Proxy classes, which in-turn use .NET Business Connector to communicate with AOS.

Basically .NET Proxy class provides access to X++ Table, Class and Enum objects only.
Advantage of .NET Proxy class
  •  Proxies require an early-bound programming model. The early-bound model enables the code editor to provide IntelliSense.

Following example try to illustrate the same, (Referring Contoso Entertainment Demo data, CEU Company) 

Step 1 :  
              Open Visual studio 2010.
Step 2 :  
               Create C# Console application project.   

Step 3 :  
               Add the project to AOT as below



Step 4 :  
                Generate proxy for table custTable, by adding to object to Project as below,



Step 5 : 
                Add reference "Microsoft.Dynamics.AX.ManagedInterop" to your project from         C:\..\AX60\Client\Bin Folder.

      
Step 6 : 
                Finally use the below code to print all the records from CustTable to console.



Step 7 : When you build project, will see the output as below

2 comments:

  1. Good articles, Have you heard of Mr Benjamin, Email: 247officedept@gmail.com --WhatsApp Contact:+1-9893943740-- who work with funding service they grant me loan of $95,000.00 to launch my business and I have been paying them annually for two years now and I still have 2 years left although I enjoy working with them because they are genuine Loan lender who can give you any kind of loan.

    ReplyDelete
  2. Do you need Finance? Are you looking for Finance? Are you looking for finance to enlarge your business? We help individuals and companies to obtain finance for business expanding and to setup a new business ranging any amount. Get finance at affordable interest rate of 3%, Do you need this finance for business and to clear your bills? Then send us an email now for more information contact us now via (financialserviceoffer876@gmail.com) whats-App +918929509036 Dr James Eric Finance Pvt Ltd Thanks

    ReplyDelete