AxActionPane control is used to display the ActionPane at the top of a Web Page in Enterprise Portal. The figure depicts the Microsoft Dynamics AxActionPane control.
AxActionPane can be added through Visual Studio, either through code or as a Web Part called “Action Pane” in your Microsoft Dynamics AX Site Collection. After adding the Web Part, the web part will be named as AxActionPaneWebPart. To add it through a web part is a little easier but at times, there are possibilities where the pack() and unpack() functions do fail while loading the Details page. Hence, it is always better to add the ActionPane through ASP.NET code on your Visual Studio project for the Details page.
The ActionPane called as AxActionPaneControl requires a reference to a dll file while loading the control in the details page. This control uses Microsoft.Dynamics.Framework.Portal.SharePoint assembly. To register this assembly, one needs to ensure that the following is added into the Web user control file.
1. The First step is to open the Visual Studio project through the Visual Studio Projects -> Web Application Projects -> <nameoftheProject>.sln file. Ensure that the Visual Studio project is opened through the AOT. This improves the refresh rate i.e. the end result of any change being made to the Visual Studio project can be immediately noticed on the Web Browser.
2. The next step is to add the following line of code
3. Once you register the assembly file and try to execute the code, the compiler will not be able to find the Library Microsoft.Dynamics.Framework.Portal.SharePoint. You will receive the following error. Remember that the Web Menus are created are defined before adding the AxActionPaneControl. Web Menus can be defined under Web node through Web -> Web Menus. Ensure that the DataSource and the Datamember property of the AxActionPaneControl are set correctly.
This is because the reference to the assembly file is not being added under the References section of the VisualStudio solution <nameofTheProject>.sln. This reference is not found under the SharePoint assemblies section. SharePoint assemblies are available under <%systemdrive%>\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI.
The reference to Microsoft.Dynamics.Framework.Portal is available under <%systemdrive%>\Program Files (x86)\Microsoft Dynamics AX\60\Client\bin\Microsoft.Dynamics.Framework.Portal.SharePoint.dll. To add this file go to the Solution Explorer Window in Visual Studio and add the reference to the project and now compile the details page project.
4. Now, compile the project and you are all set to run the AxActionPaneControl on your Details Page.
Note: This is still an issue with Microsoft Dynamics Ax2012 R1 and R2, but has been fixed in Microsoft Dynamics Ax 2012 R3.