How to add Proxy in Ax 2012 ?

Hi All

I have a class in which i defined a method.That method i want to call from enterprise portal using visual studio 2010

In ax2009 i used to Web-Static files->Proxies->add the class and method

then visual studio->Generate Proxies-

I 've gone through MSDN but it didn’t help me much.Only i got to know that i have to create One Class Library Project.After that …am not finding anything to do…

Please suggest me taking one example in ax 2012

Just drag the AX object from Application Explorer (“AOT in Visual Studio”) to your project in Solution Explorer.

See also Walkthrough: Adding an X++ Object to a Visual Studio Project [AX 2012].

Hi Martin,

But what if you want to call a method of a class.

We can’t drag class object into Project.

There is some steps to be followed.I created class Library(MyLibrary)->Build it->In my Testproject even i added the build DLL as reference.And even i am able to write Using MyLibrary; but it shows some compilation error as follows

The type or namespace name "MyLibrary" could not be found (are you missing a using directive or an assembly reference?)

I’m not an EP developer, but AFAIK proxies work in EP development in the same way as in other VS-based projects. Therefore you have to fix your problem with “We can’t drag class object into Project”. Unfortunately you haven’t provided many details, so it’s difficult to say what’s wrong. Have you added the VS project to the AOT?

Ya Martin i already added my class library project to AOT.But am not seeing any option for setting Deploy to EP->Yes in Visual Studio as per MSDN.

I got to know to know from MSDN that there are three options Deploy to Server, Deploy to Client,Deplot to EP which needs to be set as YES.

Can you please tell me where is that option as am also new to AX 2012 enterprise portal.

It’s in projects’ properties. If you don’t see the Properties window, open it by View > Properties Window.

Hi Martin

Actually what happens if you create class library project you can see this Deploy option but once you save to AOT then this option you’ll not able to see.

I got it what’s the problem.

Thank you Martin

Hi Martin

I made my class library project deploy to EP ->Proxies,

Tthen my second project i tried to add this class library as reference by addding EP Proxy Project

but am getting error as “The method or operation is not implemented”.

Do you have any idea ?

Hi, I get this same error while adding the proxy project. How did you solve this?

Hi, I has the same problem but somehow I managed to solve it. I guess you also did in the meantime.
Just in case, you should edit your project starting from the AOT in Axapta. Once the project is added to the AOT you should use the AOT to edit it.
If you still get the same error then remove the project from the AOT and add it again.
If it still refuses to add a proxy to your project then there might be a security issue with the user running the BC and / or AX server. I had to add the user to the local admin group but I think I just messed up a few things.