Morten Lehrmann's Dynamics AX Blog

Morten Lehrmann's Dynamics AX Blog

About the Blog

The Blog gathers issues I have found useful during my work with Dynamics AX

How to make a simple Enterprise Portal Web Part Page to update data in Microsoft Dynamics AX 2009

TipsPosted by Morten Lehrmann 2009-06-15 13:14:33
Prerequisites:
An environment with Microsoft Dynamics AX 2009, Visual Studio 2008, Enterprise Portal developer tools, and an Enterprise Portal on Sharepoint.

Demo:
The demo walks you through the steps needed to develop a simple Enterprise Portal Web Part Page to view and update columns of the VendTable in a grid.
Many details are omitted and knowledge of the used systems is required.

Steps -
Prefixes:
AX2009: Step to do in Microsoft Dynamics AX 2009.
VS2008: Step to do in Visual Studio 2008.
EP: Step to do in Enterprise Portal.

AX2009: Create a data Set named DemoVendTable. Set Data Source to VendTable. Set property <InsertIfEmpty> to <No>.

VS2008: Create a new .NET Framework 2.0 Web Site using the <Dynamics AX Web Project> template. Call it DemoAxWebProject.
VS2008: <Add New Item> of type Dynamics AX User Control to the Project. Call it VendTableAxWebUserControl.
VS2008: <Add to AOT> (It may be necessary to restart VS2008). Now the User Control is visible in AX2009: AOT>Web>Web files>Web Controls (restart may be neccessary).
VS2008: <View Designer> on VendTableAxWebUserControl
VS2008: In the Toolbox in the Dynamics AX section: Add an AxDataSource - set DataSetName to DemoVendTable
VS2008: In the Toolbox in the Dynamics AX section: Add an AxGridView - set Data Source to the data source created above. Set DataMember to <VendTable_Current>.
VS2008: In the Toolbox in the Dynamics AX section: Add an AxGroup - set FormID to the AxGridView created above.
VS2008: In Fields property of AxGroup add Fields: AccountNum, Name, VendGroup.
VS2008: Set <AllowEdit> and <AllowDelete> to <True>.
VS2008: Build the solution (F6).

EP: <Site Actions>: <Create> <Web Part Page> Name: DemoVendTable. Layout: <Full Page, Vertical>. Document Library: <Enterprise Portal>.
EP: <Add a Web part> - <Dynamics Infolog Web Part>.
EP: <Add a Web part> - <Dynamics User Control Web Part>.
EP: <Edit> <Modify Shared Web Part>. Set <Managed content item> to <VendTableAxWebUserControl>. <Apply> <OK>.
(May require iisreset /noforce).