Adding an ActionPane from code in EP page

I am not sure if you are a fan of adding the ActionPane control from code or directly in the EP page definition - I can see for both arguments of pro and con, but lately I am using the first approach - works faster.

One thing I always have to look for when doing this is the assembly import in the page code (not that it won't work without it, it's just nice to be able to add the ActionPane control tag and have the IntelliSense working). So, for the future this should be easier to find. Just add this to the page register section (of course as can be seen from the line below, the register directive is using an AX 2012 R3 dll version - if working with a different one, you should look for the correct version number / token):

<%@ Register Assembly="Microsoft.Dynamics.Framework.Portal.SharePoint, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="Microsoft.Dynamics.Framework.Portal.SharePoint.UI.WebControls" TagPrefix="dynamics" %>
 

and now you are ok to go and add

<dynamics:AxActionPaneControl runat="server" ID="axMainActionPanel" DataMember="YourTable_Current" DataSourceID="YourDataSource" WebMenuName="YourWebMenu" />.

No comments:

Post a Comment