1C:Enterprise 8.3. Practical Developer’s Guide. Lesson 3 (2:10). Catalogs. Hierarchical catalogs

Hierarchical catalogs

The MaterialsAndServices catalog will store information about services that the Jack of All Trades company provides, and resources that might be consumed while providing services.

This catalog will not be complex. Its only distinctive feature is its hierarchical structure. To make the catalog user-friendly, you will combine services into a group and resources into another group.

Additionally, since Jack of All Trades provides a wide range of services, you will break them down into several groups. The same is true for resources.

In Designer mode

Let us create the catalog.

  1. Create a Catalog configuration object and name it MaterialsAndServices.

    The platform automatically generates the synonym based on the name.
  2. In the Object presentation field, type Material or service.

    You do not have to fill the List presentation because the catalog synonym Materials and services will be used as a list name.
  3. Click the Subsystems tab.

    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In Designer mode 
    Fig. 3.51. Specifying subsystems where the catalog is available

    The configuration logic suggests that the list of materials and services should be available in the Inventory, Services, and Accounting sections. Indeed, this catalog is directly related to the first two sections and the list of materials and services might be frequently needed for accounting analysis.
  4. Select the Accounting, Inventory, and Services check boxes (fig. 3.51).
  5. Click the Hierarchy tab and select the Hierarchical catalog check box (fig. 3.52).

    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In Designer mode
    Fig. 3.52. Specifying the Hierarchical catalog property
  6. Click the Data tab.
  7. Leave the default values for the code length and type unchanged, and in the Description length field, type 100.

    Let us also change the synonym of the standard Parent attribute to a more clear word.
  8. Click the Standard attributes button.
  9. Double-click the Parent attribute and then, in the property palette, in the Synonym field, type Material or service group.
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In Designer mode
    Fig. 3.53. Specifying a synonym for the standard Parent attribute

    Before you start 1C:Enterprise, let us configure the applied solution interface to simplify creation of catalog items (make the standard material or service creation command visible on the action panels of the Inventory and Services sections).
  10. In the configuration object tree, right-click the Subsystems branch and then click All subsystems (fig. 3.54).
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In Designer mode 
    Fig. 3.54. Opening the subsystem settings window
  11. In the All Subsystems window, click the Inventory subsystem.

    The Command interface list on the right displays all of the commands of the selected subsystem.
  12. In the Action panel.Create group, enable visibility of the Material or service: create command.

    You can also see that the Navigation panel.Normal group contains the Materials and services command that opens the list of materials and services. It is visible by default (fig. 3.55).
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In Designer mode
    Fig. 3.55. Subsystem settings window
  13. In the list of subsystems, click Services and repeat step 12.

    You do not have to add any commands to the actions panel of the Accounting subsystem because adding materials or services in this section is not a typical scenario.

    Note. You can also open and customize the command interface for a specific subsystem from the editor of this subsystem by clicking the Command interface button. But if you need to customize the command interface for multiple subsystems at once, the All Subsystems editor comes handy.

    Next, let us populate the MaterialsAndServices catalog. On this example you will learn how to create groups and move items between groups.
  14. Close the MaterialsAndServices catalog editor and start the applied solution in the debug mode.
  15. Confirm that you want to update the configuration.

    The platform displays the window that lists the changes in the configuration structure (the new MaterialsAndServices catalog).
  16. Click Accept (fig. 3.56).
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In Designer mode 
    Fig. 3.56. List of changes in the configuration structure

In 1C:Enterprise mode

In the 1C:Enterprise window you can see that the command panels of the Inventory, Services, and Accounting sections now include the Materials and services command (see fig. 3.57).

The command name is determined by the object synonym because you have not defined any other presentations for this catalog.

  • In the Inventory section, in the navigation panel, click the Materials and services command.

    This opens the Materials and services list form.

Creating hierarchical catalog items

Let us create two groups in the catalog root: Materials and Services.

  1. In the command bar of the list form, click Create group (fig. 3.57).

    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Creating hierarchical catalog items
    Fig. 3.57. Creating groups in the MaterialsAndServices catalog
  2. Type the following group names: Materials and Services. Leave the Parent and Code fields empty.

    Next, let us fill the groups with items.

    You can add an item to a group that is currently open by clicking Create in the command bar of the catalog list form. This opens a catalog item creation form. Note that if you add an item to a group that is currently open, this group is automatically added to the Material or service group field (fig. 3.58).

    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Creating hierarchical catalog items
    Fig. 3.58. Creating items in the Materials group

    To create a catalog item, you can also use the Material or service command that is available in the Create menu of the Inventory and Services sections.

    If you add an item using this method, it is not connected to the materials and services list in any way. So the platform cannot determine the item group automatically, and you have to specify it manually (fig. 3.59).

    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Creating hierarchical catalog items
    Fig. 3.59. Creating items in the Materials group

    When specifying a value in the Material or service group field, you can use the handy "input by string" option. Once you type a few letters, the platform prompts you to select from a list of matching values.

    You do not need to open the materials or services list when you create materials or services. The fact that an item is added to the catalog is confirmed by a message in the bottom corner of the applied solution window.
  3. Double-click the Materials group to expand it and create the following items in this group:
    • Line transformer, Samsung
    • Line transformer, LG
    • Transistor 2N2369, Philips
    • Tubing, rubber
    • Power supply cable
  4. Expand the Services group and create the services related to TV set repair (fig. 3.60):
    • Diagnostics
    • Domestic TV set repair
    • Imported TV set repair
    And the services related to washing machine installation:
    • Water hookup
    • Electrical hookup
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Creating hierarchical catalog items 
    Fig. 3.60. Creating items in the Services group

Moving items between groups

Now let us divide the services into logical groups.
  1. Create two more groups in the Services group: TV sets and Washing machines (fig. 3.61).
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Moving items between groups
    Fig. 3.61. Creating a group in the Services group

    You can move a service to a group by dragging an item to a group, or by selecting an item and then clicking Move to folder in the More menu of the list form command bar.

    You can also open a catalog item and change the value in the Material or service group field (fig. 3.62).
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Moving items between groups 
    Fig. 3.62. Moving a catalog item to another group
  2. Move the Diagnostics, Domestic television repair, and Imported television repair services to the TV sets group.
  3. Move the Water hookup and Electrical hookup services to the Washing machines group.
  4. In the Materials group, create the Radio parts group.
  5. Move Line transformer, Samsung, Line transformer, LG, and Transistor 2N2369, Philips to the Radio parts group.

    Now let us move the rest of the items to the Miscellaneous group. This group is not yet available and now you will learn how to create a catalog item when you fill a field that should contain a reference to this item.
  6. In the Materials group, open the Power supply cable item.
  7. In the value selection list, click the Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Moving items between groups button.

    The platform detects that you want to create a group and opens the catalog item creation form (fig. 3.63).
  8. In the Description field, type Miscellaneous.
  9. In the Material or service group field, type Materials.
  10. Click Save and close.

    The platform creates the Miscellaneous group in the Materials group, and then it adds a reference to the Miscellaneous group to the Material or service group field of the Power supply cable item.
    Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Moving items between groups
    Fig. 3.63. Creating a material or service item from the Material or service group field
  11. Move the Tubing, rubber item to the Miscellaneous group.

    Now let us view the list of products and services as a tree.
  12. In the command bar of the Materials and services list, in the More menu, point to View mode and click Tree.

    The Materials and services list now looks as follows (fig. 3.64). Lesson 3 (2:10). Catalogs / Hierarchical catalogs / In 1C:Enterprise mode / Moving items between groups
    Fig. 3.64. Tree view of the Materials and services list

Leave a Reply

Your email address will not be published.

 

1C:Enterprise Developer's Community