1C:Enterprise 8.3. Practical Developer’s Guide. Lesson 15 (2:50). Charts of characteristic types. Creating new configuration objects

Creating new configuration objects

In Designer mode

As we mentioned above, you need to create some new configuration objects:

  • MaterialOptions catalog for describing material options
  • AdditionalMaterialProperties catalog for describing custom characteristic value types
  • MaterialProperties chart of characteristic types for creating characteristic types
  • MaterialPropertyValues information register for storing values of characteristic types for various materials options

Let us begin.

  1. In Designer, create a Catalog object named MaterialOptions.

    Let us specify that the new catalog is subordinate to the MaterialsAndServices catalog.
  2. On the Owners tab, add the MaterialsAndServices catalog to the list of owners.
  3. Create a Catalog object named AdditionalMaterialProperties.
  4. Create a Chart of characteristic types object named MaterialProperties.
  5. In the Characteristic value type field, click the Select Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode button and define the composite data type as follows (fig. 15.5):
    • Number, length: 15, precision: 3
    • String, length: 25
    • Date
    • Boolean
    • CatalogRef.AdditionalMaterialProperties
    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode
    Fig. 15.5. Specifying a composite data type for the characteristic value type of a chart of characteristic types
  6. For the AdditionalMaterialProperties catalog, specify the MaterialProperties catalog as the owner (fig. 15.6).

    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode
    Fig. 15.6. Specifying catalog owner
  7. Specify that the additional characteristic values for the chart of characteristic types are stored in the AdditionalMaterialProperties catalog (fig. 15.7).

    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode
    Fig. 15.7. Chart of characteristic types editor window
  8. Create an InformationRegister object named MaterialPropertyValues.
  9. On the Data tab, create the register dimensions:
    • PropertySet. Master, type: CatalogRef.MaterialOptions
    • PropertyType. Type: ChartOfCharacteristicTypesRef.MaterialProperties
  10. Create a register resource (fig. 15.8):
    • Value. Type: Characteristic.MaterialProperties.
    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode
    Fig. 15.8. Information register editor

    Note that you can define a value type for a register resource as Characteristic.<name>. It is the composite data type that is defined in the value type for the corresponding chart of characteristic types. In other words, a register resource can have a value of any type among those defined in the value type of the chart of characteristic types.
  11. In the Link by type property of this resource, select the PropertyType register dimension.

    A link by type ensures that the value types that can be entered in this field match the characteristic type selected in the PropertyType field.
  12. For the Choice parameters links property, click the Select Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode button and move the PropertyType register dimension from the list of available attributes to the list of parameters.

    Specifying a value for the Choice parameters links property ensures that when values stored in the Additional material properties catalog are being selected, only values related to the selected characteristic are suggested instead of all the values in the catalog (fig. 15.9).

    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode
    Fig. 15.9. Information register resource properties

Description of material option characteristics

Finally, for the MaterialOptions catalog, let us specify where the material option properties are stored and how one can retrieve their values. The platform will use the description to generate reports and various dynamic lists based on material options.

  1. Right-click the MaterialOptions catalog and then click Characteristics (fig. 15.10).

    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode / Description of material option characteristics
    Fig. 15.10. Switching to the characteristics of the MaterialOptions catalog

    This opens the Additional characteristics of metadata object dialog box.
  2. Click the Add Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode / Description of material option characteristics button in the command bar.

    This adds a new record.
  3. Select the MaterialProperties chart of characteristic types as a source of characteristics.

    The platform automatically determines that the key field is the Ref field of this configuration object (fig. 15.11).

    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode / Description of material option characteristics
    Fig. 15.11. Description of the source of the characteristic types
  4. Leave the Field of type selection and Value of type selection fields empty.

    This scenario does not require filling these fields.

    Let us proceed to describing where the property values are stored.
  5. Select the MaterialPropertyValues information register as a source of characteristic values.

    The platform automatically determines that in this register the PropertySet dimension is the object field and the PropertyType dimension is the type field. The only thing you have to specify manually is where the property values are stored.
  6. In the Field of value column, select Value.

    The resulting characteristic description for the MaterialOptions catalog should look as shown in fig. 15.12.

    Lesson 15 (2:50). Charts of characteristic types / Creating new configuration objects / In Designer mode / Description of material option characteristics
    Fig. 15.12. Description of characteristics for the MaterialOptions catalog

Leave a Reply

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

1C:Enterprise Developer's Community