Enumerations
1C:Enterprise script objects used for operations with enumerations
The following chart shows the interaction between 1C:Enterprise script objects used for operations with enumerations (fig. 29.9).
Fig. 29.9. 1C:Enterprise script objects used for operations with enumerations
Note. The object method from which the arrow originates is marked with the respective number in the listing, while the target object of the arrow is the type of returned object.
Learn more! For details on major types of 1C:Enterprise script objects, see section 1C:Enterprise script objects used for operations with applied data.
For examples of operations with enumerations that involve 1C:Enterprise script objects, see listing 29.7.
Listing 29.7. Object usage examples
1. // Global context // Enums // Example: getting an enumeration value by index. Enums.MaterialServiceTypes.Get(0); 2. // EnumsManager object // .<enumeration name> // [<enumeration name>] // For Each … In … Do … EndDo; // Example: getting the number of enumeration values. Enums.["MaterialServiceTypes"].Count(); 3. // EnumManager.<enumeration name> object // .<enumeration value name> // [<enumeration value name>] // [<collection element index>] // For Each … In … Do … EndDo; // EmptyRef () // Example: getting an empty reference to an enumeration value. … EnumEmptyRef = Enums.MaterialServiceTypes.EmptyRef(); If CurrentMaterialOrService.MaterialServiceType = EnumEmptyRef Then // Prompting to fill the type. … EndIf; …