Microsoft Dynamics 365 Blog

When you are developing new Enterprise Portal content in Dynamics AX 2009 you should rather create new ASP.NET User Controls in Visual Studio 2008 (stored in the Web Controls in the AOT) than new Web Forms. Never the less Web Forms are still supported in Dynamics AX 2009 and you can still add them to your Enterprise Portal pages.

When you are placing Web Forms on your Enterprise Portal sites that are based on certain tables like the PurchTable or SalesTable you will however notice that no data is displayed in those Web Forms. The default Web Form EPPurchTableList is a good example.

If you look at the PurchTable and SalesTable in the AOT you can see that both have a relation with Common. This relation is causing an incorrect where clause for Web Forms to be created resulting in no data showing up in the Web Form. Below you can see the query that is generated for the Web Form EPPurchTableList:

SQL query in Dynamics AX 2009 SQL query in Dynamics AX 4.0
SELECT * FROM PurchTable
ORDER BY urchTable.createdDateTime DESC
WHERE ((NOT (PurchaseType = 4)
AND NOT (PurchaseType = 1)))
AND Common.RecId=PurchTable.AddressRefRecId
AND Common.TableId=PurchTable.AddressRefTableId
SELECT * FROM PurchTable
ORDER BY urchTable.createdDate DESC
WHERE ((NOT (PurchaseType = 4)
AND NOT (PurchaseType = 1)))

It is important to notice that this issue is only occurring for Web Forms in Dynamics AX 2009, not for regular Client Forms and also not for Web Controls.

You can however work around this issue by adding one line of X++ code to the affected Web Form:


You need to add the code to the Init method of the datasource (of the Web Form) that has the relation with Common. TableName is:again the table that has the relation with Common, e. g. PurchTable in the case of EPPurchTableList.

For the EPPurchTableList Web Form the Hotfix KB971123 is exactly following the same approach.

If you are looking for information on how to convert existing Web Forms to ASP.NET User Controls see Converting Enterprise Portal Content.

–author: Alexander Lachner
–editor: Alexander Lachner
–date: 09/07/2009

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!