Skip to main content

Posts

Showing posts with the label Visual Studio

Call your Ax customization from Visual Studio C# code

How about calling your Axapta customizations (Classes / Class & Table methods / Enums) from your EP User control? For this you need your X++ code resources available for use in Visual Studio. A proxy can do it for you. Ax already has this proxy defined for you as Proxies static file that is maintained in the AOT. You need to add references for your classes, methods or enums that you want to access from User Controls to this existing proxy. Step 1 Add to the proxy In the AOT, Go to Web --> Web Files --> Static Files --> Proxies file Right-click the Proxies file, and then click Edit. Use the Web Application Editor to add definitions for the additional items that you want to include in the proxy. You can use the existing items in the proxy as a template for how to add more items. To add an enum, use the following syntax. /enum:EnumName To add a class that has methods, use the following syntax. /class:ClassName /method:ClassName.MethodName To add ...