My experience on Dynamics Ax 2012 EP Installation

Started working on Ax 2012, and recently installed the Enterprise portal (EP) in my system.

OS is Windows 7 Enterprise edition.

SharePoint Foundation 2010 can be downloaded from the following link.

I have downloaded the same, and tried the installation (by running .exe directly)… but have seen the following error.

Then, as a routine goggled for the issue, got the  following link….

By following the above link, successfully installed the SharePoint and completed the EP installation also.

Categories: Dynamics Ax 2012, EP 2012

Dimension (Field Value) Search Utility in Dynamics Ax

In recent days, I got a specific requirement…

At our place, finance controller has decided to close one dimension value and need to replace the same with new dimension value.

To support this, we need to update all the transactions which have old dimension value, to new one.

Assume all the transactions, which are created Dimension [10] – Business unit with value 201, need to update as 203

static void ininspar_Dimension201_Update_Alltables(Args _args)
    TreeNode                tn,fn;
    TreeNodeIterator        tni,fni,_tni;
    Str                     objName;
    SysDictField            sysDictField;
    Common                  common;
    Query                   query = new Query();
    QueryBuildDataSource    qbs;
    QueryBuildRange         qbr;
    TableId                 mTableId;
    QueryRun                qr;

    tn = TreeNode::findNode(“\\Data Dictionary\\Tables”);
    tni = tn.AOTiterator();
    tn =;

    while (tn)
        objName = tn.treeNodeName();

        tn =;

        mTableId = tableName2id(objName);
        sysDictField = new SysDictField(mTableId, fieldname2id(mTableId, “Dimension”));  // Finding table object which have Dimension field

        if (sysDictField && Global::hasTableAccess(mTableId))
                qbs = query.addDataSource(mTableId);
                qbr = qbs.addRange(fieldId2Ext(fieldname2id(mTableId, “Dimension”),10));   // using Dimension[10] in query range

                qr = new QueryRun(query);
                while (

                    common = qr.get(mTableId);
                    if (common.RecId)
                        common.(fieldId2Ext(fieldname2id(mTableId, “Dimension”),10)) = “203”; //assigning the Dimension[10] value by using Common
                        info(strfmt(“%1 %2”,objName, int2str(common.RecId)));



With this, we can write some Advanced Search utilities, to find specific values for some fields for the tables.

Categories: DynamicsAx Utilities

AIF – Update – The parameter index is not valid

October 4, 2011 2 comments

In recent days, working on AIF – Update action, and find one strange error as mentioned below.

Error: The parameter index is not valid.

Trying to solve the same, and then have checked on the parameter schema, it was defined as follows…

So realized, we need to submit two XML’s for the update scenario, or combination of these two required and then tried in the following way…

<Envelope xmlns=””>






<MessageParts xmlns=”“>

<EntityKeyList xmlns=”“>
<EntityKey xmlns=”“>
<Tel_Dimensions xmlns=”“>

<Closed>No</Closed><CompanyGroup>12345</CompanyGroup><Description>IN Global Support India – TEST123456</Description>


Categories: Dynamics Ax

AIF File System Common Error

After 2 years, again, started working on AIF related project.

Want to share one important message w.r.t File system Adapter.

Long time back, have shared one article for the common error in File system adapter,

Common Error: Cannot be read because the submitting user could not be determined. The default owner for objects created by members of the Administrators group must be set to the object creator.

 Above article is, w.r.t windows 2003 server, whereas windows 2008 and other advanced server don’t support this functionality.

Instead of changing folder properties and all, we can achieve the same through our Ax…

Assume that on the Endpoint (AIF – Setup) we have, defined the following user…

Take the SID from UserInfo table for the above user, and assign the same as shown in following picture.


Categories: Dynamics Ax

Redirecting to the pages using Action Menu Items.

In this example, want to illustrate, how we can use an Action Menu Item, to re-direct to the EP pages of Ax.

Have a look into the following picture.

Have placed the Image button, beside the Project Id.

On the click event of the Image button, calling Ax action menuitem and in the related action menu item class, redirecting to the details page by passing the required arguments.

The following code from the C# web part, click event of Image button.

protected void ImageButton_Click(object sender, EventArgs e)
 //The following lines for, to get the index of the selected row on the grid.
   ImageButton imageeButton = (ImageButton)sender;
   GridViewRow row = (GridViewRow)imageeButton.NamingContainer;
   AxGridViewTimesheet.SelectedIndex = row.DataItemIndex;      
   DataSetViewRow dsvr;
   //Creating object for Action menu item
   AxActionMenuItem projMenuItem = new AxActionMenuItem("PMProjTimesheetView");
   Proxy.Args args = new Proxy.Args(this.AxSession.AxaptaAdapter);
   //Get the current record
   dsvr = 
   IAxaptaRecordAdapter projTable = dsvr.GetRecord();
   //Passing the record to the action menu item class
   args.record = projTable;

The following code from the Ax action menu item related class (PMProjTimesheetView)

static void main(Args args)
    ProjTable           projTable;
    Weblink             link;
    if (args.dataset() == tablenum(ProjTable))
        projTable = args.record();
        link = new Weblink();
        link.menufunction(new WebUrlMenuFunction(weburlitemstr(EPProjTableInfo)));
Categories: Dynamics Ax, EP

Hover Text in our Dynamics Ax EP Page

January 1, 2011 2 comments

Happy and Prosperous New Year – 2011.

In this article, I want to share the example like, 

Displaying Hover text or Popup window with a text, will be displayed in our EP pages of Dynamics Ax. 

Assume that, we need to place the memo fields like Address/Notes/Comments fields on the grid, in this case these fields will take much space on the Grid. Page size is also more. 

For this scenario, the following example helps us to decrease in the size of the Grid and value will be displayed as Hover text. 

In this example, I am displaying the Hover text for the Customer Address, 

On the AxGridView,

1)      Converted the Address field to ASP Template fields. (Template text field)

2)     Defined the JavaScript functions for Mouse Over and Mouse Out.


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SampleExample.ascx.cs" Inherits="SampleExample" %>
<%@ Register Assembly="Microsoft.Dynamics.Framework.Portal, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
 Namespace="Microsoft.Dynamics.Framework.Portal.UI.WebControls" TagPrefix="dynamics" %>
<dynamics:AxDataSource ID="DSSampleExample" runat="server"
    DataSetName="CustomerList" ProviderView="CustTable">
<script type="text/javascript" language="javascript">
var div = null;
var addname = "NoAddress";
function initDocu()
   div = document.createElement('div'); = 'divPopup'; = 'hidden'; = 'absolute'; = '0'; = '0'; 
function ShowPopup(hoveritem) 

   var address = document.getElementById(;
   addname = address.value;

    if (addname)
        hp = div; =  event.clientY; = event.clientX; = "visible";
        var html = '<table bgcolor="#666666">'; 
        html += '<tr><td bgcolor="#FFFFE1">'; 
        html += addname
        html += '</td></tr></table>';
        hp.innerHTML = html;
function HidePopup() 
  hp = div; = "hidden";
<dynamics:AxGridView ID="AxGridSampleExample" runat="server"
    DataKeyNames="RecId,ContactPerson!RecId" DataMember="CustTable"
    DataSourceID="DSSampleExample" >
        <dynamics:AxBoundField DataField="AccountNum" DataSet="CustomerList"
            DataSetView="CustTable" SortExpression="AccountNum">
        <dynamics:AxBoundField DataField="Name" DataSet="CustomerList"
            DataSetView="CustTable" SortExpression="Name">
        <dynamics:AxBoundField DataField="InvoiceAccount" DataSet="CustomerList"
            DataSetView="CustTable" SortExpression="InvoiceAccount">
        <dynamics:AxBoundField DataField="CustGroup" DataSet="CustomerList"
            DataSetView="CustTable" SortExpression="CustGroup">          
        <dynamics:AxBoundField DataField="PaymTermId" DataSet="CustomerList"
            DataSetView="CustTable" SortExpression="PaymTermId" >
        <asp:TemplateField ConvertEmptyStringToNull="False" 
            HeaderText="<%$ AxLabel:@SYS9362 %>" SortExpression="Address" >
                <asp:TextBox ID="TextBox1" runat="server"  
                    Text='<%# Bind("Address") %>' 
                    onmouseout="HidePopup();" ReadOnly="true">
            </asp:TextBox>        </ItemTemplate>

Now the page looks like as follows….


Categories: Dynamics Ax, EP

Display Company Logo on Dynamics EP Site and Hide Page Title

December 10, 2010 2 comments

In this example, I want to share the things like

1)      Display the Company logo, on the EP site.

2)      Hide the Page title, the one which is there, to the side of the Company logo. 

To do the above things, go to the following path in the sharepoint server..

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\DynamicsAxEnterprisePortal

Select the filefor Editing in the Visual Studio…

In that file locate the Tag with the Id “GlobalTitleAreaImage”, and add the following Blue marked attributes to that Tag, as shown in below.

 LogoImageUrl is for displaying the image/company logo on the EP page.

  style=”display:none” for hiding the page title. 

 <td id=”GlobalTitleAreaImage”>
 <SharePoint:SiteLogoImage id=”onetidHeadbnnr0″ 
   LogoImageUrl=”_layouts/ep/images/Dynamics_Logo.bmp” runat=”server”/></td>
   <td width=100% style=”display:none”>
       <asp:ContentPlaceHolder id=”PlaceHolderSiteName” runat=”server”>
              <SharePoint:SPLinkButton runat=”server” NavigateUrl=”~site/” id=”onetidProjectPropertyTitle” >
              <SharePoint:ProjectProperty Property=”Title” runat=”server” />

Save the file and do the IISReset. Now refresh the same page and see the result as follows…


Categories: Dynamics Ax