Developing the Duet Sales Order Management Solution
Applies to: Duet Enterprise for Microsoft SharePoint and SAP Server 2.0 | Office 2010 | SharePoint Server 2010
In this article
Design Considerations for the Duet Sales Order Management Solution in SharePoint
Components of the Duet Sales Order Management Solution
The Duet Sales Order Management Project in Visual Studio
The Duet Sales Order Management solution is a simplified version of the kind of solution you would develop in Visual Studio to be able to take advantage of SharePoint Server, , and Duet Enterprise for Microsoft SharePoint and SAP.
Design Considerations for the Duet Sales Order Management Solution in SharePoint
For the sake of simplicity and to demonstrate various features of SharePoint and Duet Enterprise, the solution was designed based on several considerations, including the following:
Changes to the default Duet Enterprise installation on the computer that is running SharePoint Server are minimized by adding components rather than changing existing components. For example, we use Web Parts to contain the customizations of the standard forms for the external lists associated with the Sales Order external content types. These Web Parts are deployed to SharePoint with the solution. On activation, the default Form Web Parts are hidden on the site and the custom parts are displayed instead.
Similarly, no changes are made to master pages in SharePoint Server. To provide user interface enhancements, such as the addition of a custom action to the menu associated with list items or populating a dialog window with predetermined data, the JavaScript client object model in SharePoint Server 2010 is manipulated by using JavaScript that is integrated into site pages via the ContentLink property of a ContentEditorWebPart object, which is then added to a Web Parts page used in the solution.
To simplify debugging, deployment, and development, the Duet Sales Order Management solution has been developed as a farm solution using fully trusted code rather than as a sandboxed solution.
Components of the Duet Sales Order Management Solution
After the development work has been done in the SAP environment to create web services that provide the means to interact with SAP data, the first step in creating the solution for SharePoint is to create external content types based on those web services. In Data Models for the Duet Sales Order Management Solution, we explain the Business Data Catalog (BDC) models that define the external content types used in the solution.
Then, using those external content types as the foundation for the project, we walk through developing the solution in Visual Studio 2010 in four phases:
In Developing the Primary Components for the Solution, we describe the steps for you to follow to build the basic solution, including the creation of List Instances for the external content types, customizing default List Forms, and coding the routines to be run on feature activation.
In Adding User Interface Enhancements, you continue to develop the solution by adding mechanisms to facilitate data entry and to support simple validation of entered data.
In Configuring and Activating Reporting, you add code to activate features that take advantage of SAP reporting capabilities in Duet Enterprise.
The Duet Sales Order Management Project in Visual Studio
Throughout this walkthrough, we refer to the SharePoint solution in general as the Duet Sales Order Management solution. In the code that accompanies this walkthrough, the Visual Studio solution file itself is named DuetSalesOrderSolution.sln. Because the Visual Studio solution includes only one project, that project file is named DuetSalesOrderSolution.csproj, which is displayed in Solution Explorer in Visual Studio as a project named DuetSalesOrderSolution under the top-level Solution node (Figure 1). Throughout this walkthrough, the the name DuetSalesOrderSolution refers to the Visual Studio project itself.
Note
Although the Duet Sales Order Management solution can be fully implemented in Visual Basic, the implementation of the solution for this walkthrough is in C#. Consequently, the selections of code from the solution displayed in the topics in this walkthrough are all in C#.
Figure 1. Duet Sales Order Management project files
.gif)
The project for the Duet Sales Order Management solution includes the following SharePoint project items and Visual Studio components:
The SalesOrderSiteFeature Feature is scoped to the level of a single website and includes the sales order List Instances and Module that includes script files.
The SalesOrderWebPartsFeature Feature is scoped to the level of a site collection and includes the Visual Web Parts for the solution.
The Customizations folder includes files for class modules related to customizing and configuring the components of the solution.
The CurrencyList.cs file implements the CurrencyList class, which manages a SharePoint list, CurrencyData, that stores currency types.
The ListCustomizations.cs file implements the ListCustomizations class, which includes routines for configuring the external lists associated with sales orders.
The Reporting.cs file implements the Reporting class, which enables reporting capabilities on the target SharePoint site of the solution.
The ListData folder includes a structured data file, CurrencyData.xml, used by the solution to populate the CurrencyData SharePoint list.
The SalesOrderHeadersList Instance is the project item used to implement a SharePoint external list associated with the Sales Order Header external content type.
The SalesOrderHeadersVisualWebPart project item is a Visual Web Part used to customize the list item form pages for the Sales Order Headers List.
The SalesOrderItemsList Instance is the project item used to implement a SharePoint external list associated with the Sales Order Item external content type.
The SalesOrderItemVisualWebPart project item is a Visual Web Part used to customize the list item form pages for the Sales Order Items List.
The SalesOrderModule project item is a SharePoint Module used to deploy several files to the target SharePoint site of the solution.
The SalesOrderHeaderScript.htm file contains script routines for customizing the list item menus of headers in the Sales Order Headers List.
The SalesOrderItemScript.htm file contains script routines for manipulating the New Item form for the Sales Order Items List.
The SalesOrderDiagnosticService.cs file implements a class, SalesOrderDiagnosticService, for managing logging operations in the solution.
In the topics that follow, we walk through the development of each of these components to create the Duet Sales Order Management solution, a simple but fully functional SharePoint application for Duet Enterprise.
See Also
Other Resources
Getting Started with Development for SharePoint Foundation 2010