Enumerations

Enumerations are used in a model to define a set of values that can be used for a specific attribute of a business entity. Each enumeration has a name that uniquely identifies it, and a set of name-value pairs that define the possible values for the enumeration. The enumeration name corresponds to a type for an attribute of a business entity.

The following example shows the LeadCategory enumeration. This enumeration has eight possible values representing the types of potential customer leads.

[spacer]

To use this enumeration, you would specify LeadCategory as the type for a business entity attribute. For example, the Lead entity shown in the following illustration has a Category attribute, whose type is defined by the LeadCategory enumeration.

[spacer]

When code is generated, a separate C# source file is produced for each enumeration, each containing the definition of the enumeration. These source files must be compiled into the business entity. Any business entity attribute whose type is defined by an enumeration will reference the C# definition.

For Business Portal integrations, you will typically create enumerations for any data items that contained static values, such as list boxes.