Compartilhar via


Enumerations

To make using the Dynamics GP service easier, several properties have enumerations (a predefined set of values) defined for them. For example, the Customer class has the StatementCycle property that defines when the customer will be billed. This property has the type StatementCycle, which is an enumeration defined by the service. It has the following values:

Constant

Description

No Statement

No statements sent

Weekly

Statements sent weekly

Bi-Weekly

Statements sent once every two weeks

Semi-Monthly

Statements sent twice each month

Monthly

Statements sent once each month

Bi-Monthly

Statements sent once every two months

Quarterly

Statements sent once each quarter

When you create a web reference to the legacy endpoint or a service reference for the native endpoint, the proxy generated will contain all of the enumerations. These simplify working with these properties. For example, the following C# statement shows how the StatementCycle property can be set for a customer object.

customer.StatementCycle = DynamicsGPService.StatementCycle.Monthly;

For some properties that use an enumeration, the value of the property isn't a single value from the enumeration. Instead, it is the summation of zero or more of the values from the enumeration. For instance, the Company class has the CompanyOptions property. The CompanyOptions enumeration is used to set the value of this property. The value of the property is the sum of the enumeration items that apply to the company.