Chapter 12. Enterprise Portal

In this chapter, you will learn how to create the .aspx pages in Microsoft SharePoint based on the templates that come with the Enterprise Portal. You will also learn how to create Dynamics AX user controls that will expose data from AX to the Enterprise Portal.

Dynamics 2012 has taken a huge step with regards to the development of web content. In previous versions of AX, you could publish web content using Web Parts defined in AX. These Web Parts are now being phased out and replaced with a .NET-based Enterprise Portal framework in AX.

You will learn the basics so that you can explore the wonderful world of web development for Dynamics AX on your own. This chapter might not make you an expert in Enterprise Portal development, but it will give you a sense of how to work with it and how the different elements are tied together.

To learn more about Enterprise Portal development, please refer to the Dynamics AX 2012 SDK documentation here: http://msdn.microsoft.com/en-us/library/aa493463%28v=ax.10%29.aspx,

In this chapter, we will go through the following topics:

  • Creating a dataset containing the RentalTable table
  • Creating a webpage that will display a grid consisting of the records from the RentalTable table
  • Creating a wizard/tunnel that is used to create a new record in the RentalTable table
  • Creating a toolbar that contains a menu item that is used to start the wizard
  • Converting existing WebForms defined in AOT to .NET user controls

Creating a dataset

First of all, let's see how we can create datasets in AX that will be used by .NET controls later on.

The datasets defined in AOT are used by the AxDatasource control in ASP.NET to fetch data from AX and send it back again when data is updated in a data-binding-enabled ASP.NET control.

A dataset can be considered as a replacement of the data source node in the web forms and web reports. Since web forms and web reports will eventually be removed from AX, we now need another way of connecting the fields in our .NET forms to fields in AX tables:

  1. To create a dataset, open AOT and browse to Data Sets, right-click on it and select New Data Set.
  2. Right-click on the new dataset and select Properties to see the Properties window. Then, change the name to RentalDataSet.
  3. Go to the Data Sources node under RentalDataset and add a new data source by right-clicking on the Data Sources node and selecting New Data Source. Open the Properties window for the new data source and change the table and name property to RentalTable.

The dataset should now look like this:

Creating a dataset
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.113