Using eConnect

The Dynamics GP Service framework uses eConnect to retrieve, create, update, and delete data in the Microsoft Dynamics GP database. To add a document type to the service framework, you need to supply eConnect SQL stored procedures and Transaction Requester metadata for your document. The following sections describe what you need for each type of service design.

Using the Transaction Requester to retrieve documents

To retrieve a single record or a list of records, the Dynamics GP Service framework uses the eConnect Transaction Requester. When implementing a GetByKey or GetList operation, you need to identify the data fields for your document and summary document. You use the name of these fields when you add your document metadata to the Transaction Requester. The metadata provides the information the Transaction Requester uses to construct a query that returns the specified record or records.

The Transaction Requester returns an XML document that contains the document data. To enable the Dynamics GP Service framework to use the Transaction Requester, you need to map the data values from the Transaction Requester XML document to an instance of your service framework document or summary document.

For more information about how to use the Transaction Requester to retrieve docucments, see Updating the Transaction Requester for retrieve operations.

Using eConnect SQL stored procedures to create, update, and delete documents

To implement service methods that create, update, and delete documents, you need to give the Dynamics GP Service framework access to the tables in the Microsoft Dynamics GP database that store the data for your document.

The Dynamics GP Service framework uses eConnect stored procedures to create, update, or delete data. To add your document to the service framework, you need to add a SQL stored procedure that works with eConnect for each operation. You must also define any business logic that is associated with each operation. When you create your SQL stored procedures, add the document business logic that you defined to each stored procedure.

To use your SQL stored procedures with eConnect, you must define eConnect XML documents for each operation. These eConnect XML documents must comply with the eConnect schema requirements. For example, your eConnect XML document must specify a document name, a SQL stored procedure name, and the name of each input variable.

To enable the Dynamics GP Service framework to use eConnect and your stored procedures, you need to map the data values from your service framework documents to your eConnect XML documents. The data fields of the eConnect XML document represent the input parameters of your eConnect stored procedures.

For more information about how to add SQL stored procedures to eConnect, see Adding a SQL stored procedure for create and update operations.