Posts

Showing posts from 2012

Displaying a value from a array field in EP

<dynamics:axgroup id="AxGroup11" runat="server"> <dynamics:axboundfield datafield="ArrayField@1" dataset="FuBarDataSet" datasetview="FuBarDataSetView"></dynamics:axboundfield> <dynamics:axboundfield datafield="ArrayField@2" dataset="FuBarDataSet" datasetview="FuBarDataSetView"></dynamics:axboundfield> </dynamics:axgroup>

Tech overview AX 2012 enterprise portal

Here  is the tech overview of EP in AX 2012. If you have previously worked with EP in AX2009 I recommend reading the page about the new features like. - Proxies - Modal Dailogs - Modal Prompts - Security in EP

Creating a new custom workflow

To get started with creating new workflows in AX 2012 the following links are recommended reading. Slideshow that cover most parts Microsoft guide Debugging workflow

Create a new project for developing webparts

Follow the guide by Microsoft.  Don’t use .NET Framework 2.0 as the guide say, use the latest version. And the guide leaves out an important thing, creating the proxies. To create the proxies, right click on the folder App_Code -> Generate proxies. You will probably need then sooner or later. 

How to export financial statements

Export this table list and import into the target environment: DimensionSetTable DimensionPriorityTable LedgerBalHeaderDim LedgerRowDef LedgerRowDefLine LedgerRowDefLineCalc LedgerBalColumnsDim

Updating a sales order from a technical perspective

Formletter <- SalesFormLetter <- SalesFormLetter_PickingList If a posting is done in batch on server SalesFormLetter will automatically spawn tasks of the type FormLetterMultiThread and use multiple threads to complete the tasks simultaneously. The batchjob is saved with parameters in the table SalesParmUpdate along with its query. For each head that will be created a record in SalesParmTable will be created with its lines in SalesParmLine. FormLetterMultiThread has no error handling for duplicate key. This can cause problems when the more than one task will try to insert the same record in InventDim

Disable AxToolbar when the grid is empty

By adding this code to the page it's possible to disable or hide the AxToolbar and add logic on menu items. void Page_Init(object sender, EventArgs e) { // Setup event handler for toolbar connected via webpart connections if (this.NameofAxToolbar != null) this.NameofAxToolbar.SetMenuItemProperties += new EventHandler (webpart_SetToolbarMenuItemProperties); } protected void webpart_SetToolbarMenuItemProperties(object sender, SetMenuItemPropertiesEventArgs e) { if(EPProjTableList.GetDataSourceView(this.EPProjTableListGrid.DataMember).DataSetView.Count < 1) { e.MenuItem.Disabled= true; } } Read more here

Can't edit EP page title

Image
If your having problems setting the title of you EP webpage when running Dynamics AX 2009 with a sharepoint 2010 and enterprise portal. It seems this is a known bug and the workaround is to edit the 'label' property of the web page in the AOT (Managed Content Item), and deploy the page. See Screenshot

EP problems with layout

To ensure that the same EP settings are used for creating site collections in different environments. Copy the below mentioned files from the machine where AX 2009 EP is already installed and place it under the same location on the target machine. File: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML\WEBTEMPAXSITEDEF.XML C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\AxSearchResultsWssV3.aspx C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\web.config Folders and sub folders: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\AXSITEDEF C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\AXSITEDEF C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\ep The file "web.config" in the LAYOUTS folder will get overwritten, the other files and folder

Expressions in query ranges

When creating expressions with comparisons to strings you might have to surround the string with " " like in the example below. queryRange = strFmt('((%1 == \"%2\") || (%3 == \"%4\"))', fieldStr(ProjTable, Responsible), queryValue(element.getEPProjWebApp().EPProjUser().emplId()), fieldStr(ProjTable, ResponsibleFinancial), queryValue(element.getEPProjWebApp().EPProjUser().emplId())); It's important to use \" to achieve the correct behavior. Read more about ranges here