1C:Enterprise 8.3. Practical Developer’s Guide. Lesson 10 (0:40). Enumerations. Linking materials and services to values of the MaterialServiceType enumeration

Linking materials and services to values of the MaterialServiceType enumeration

To link materials and services to enumeration values, you have to do the following:

  1. In Designer, create a MaterialsAndServices catalog attribute that will store enumeration values.
  2. In 1C:Enterprise mode, specify the values of this attribute for all the items in the MaterialsAndServices catalog.

In Designer mode

Let us add the attribute to the MaterialsAndServices catalog.

  1. Open the object editor window for the MaterialsAndServices catalog.
  2. On the Data tab, click the Add Lesson 10 (0:40). Enumerations / Linking materials and services to values of the MaterialServiceType enumeration / In Designer mode button and add the MaterialServiceType attribute with type EnumRef.MaterialServiceTypes and synonym Type (fig. 10.2).
    Lesson 10 (0:40). Enumerations / Linking materials and services to values of the MaterialServiceType enumeration / In Designer mode

    Fig. 10.2. MaterialsAndServices catalog attributes

In 1C:Enterprise mode

Let us set the attribute values.

  1. Run 1C:Enterprise in the debug mode.
  2. For each catalog item, specify its Type (fig. 10.3).

    Lesson 10 (0:40). Enumerations / Linking materials and services to values of the MaterialServiceType enumeration / In 1C:Enterprise mode
    Fig. 10.3. Materials and services catalog items

Now let us discuss the uses of the new data stored in the MaterialServiceType enumeration.

Leave a Reply

Your email address will not be published. Required fields are marked *

1C:Enterprise Developer's Community