Thursday, June 02, 2011

How to use ActiveX in Dynamics Ax

Hi Guys,
Finally I got time to post an article for you.
Today I will show you how to use ActiveX in Dynamics Ax (Axapta)...


When creating an Axapta form, you can benefit from using ActiveX controls. An ActiveX control is a COM object that can be used as a graphical control inside an application.

The software available as ActiveX components spans from simple components such as check and combo boxes, to larger more complex components such as spreadsheets, calendars, Internet browsers, and communication programs.


In this article the screen shots I used of Ax 3.0.
I will tell you step by step as below:
You should have Microsoft Outlook installed on your system.

No warranties, use at your own risk.


1) Open your AOT and point to Forms.


2) Right click on Forms node and select New Form from the context menu as shown below

























3) Rename the form to OutlookAccess












4) Expand the Form nodes and to Designs>Design


5) Right click on Design>New Control>ActiveX as shown below

















ActiveX Browser will open. Select Microsoft Office Outlook View Control as shown below




























6) Create two Groups on form Design. Drag and drop the ActiveX control to the first group and in the second group add a ButtonGroup control as shown below.















7) Now add two buttons to the ButtonGroup. Add Override method "clicked" to each of the button.



8) In the first button's clicked method write "activex.Open();" before super(); as shown below;














9) Write "activex.AddressBook();" in the second button's clicked method before super();












Now your form design looks like this

























10) Save the form and run the form.


Hope it will help you a lot.

No comments:

Post a Comment

Enable UAT database over OneBox DevTest environment using JIT

 Dear Friends, In this Article I will show you how to enable UAT database access for Development machine using just-in-time (JIT). Many time...