Sdílet prostřednictvím


Overview of a document type

You need to choose a name for your document type. Use this type name to identify your document type class and its related classes. For example, the code samples that follow use a type name of Lead.

Hint: You will encounter a number of services naming conventions that require you to include your type name.

When you create a document type assembly, you need to specify a namespace that includes all your document classes. Choose a namespace that ensures your class and enumeration names are unique.

To add a new type of document to the Dynamics GP service, you must create a .NET assembly that defines the document type. The Dynamics GP Service framework requires the assembly to include classes for the following:

Class use

Description

Document type

A class that defines the business document. The class must inherit from the Microsoft.Dynamics.Common.BusinessObject class. The class must be serializable and uniquely identifiable.

Document key

A class with a data property that uniquely identifies a single document. The class must inherit from the Microsoft.Dynamics.GP.ReferenceKey class. The class must be serializable.

Summary

A class that defines a limited number of the most important data fields from a business document. The class must inherit from the Microsoft.Dynamics.Common.BusinessObject class. The class must be serializable.

Criteria

A class that contains the restrictions that define what is returned by a GetList operation in the Dynamics GP service. The class must inherit from the Microsoft.Dynamics.Common.Criteria class. The class must be serializable.

Summary array

A class that enables the service to retrieve a collection of summary documents . The class must inherit from the System.Collections.Generics.List class.

When you create a new document type, you need to specify the data members for your document. The data members in your document type correspond to the data fields that are supported by your eConnect business objects and Transaction Requester metadata that you defined. For more information about adding eConnect support, see Defining eConnect Operations.