1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. 1C:Enterprise Development Standards
  3. Creating and modifying metadata objects
  4. Configuration operation arrangement

Initial actions when using configurations

  • Configuration operation arrangement
    • General configuration requirements
    • Names of metadata objects in configurations
    • Working in different timezones
    • Using functional options
    • Using session parameters
    • Using subsystems
    • Using common attributes
    • Using defined types
    • Common modules creating rules
    • Working with user settings
See more

Scope: managed applications, mobile applications, and ordinary applications.

1. Each configuration needs to have functionality that automatically detects when the configuration is started for the first time and fills in the infobase with the minimum required data. It also needs to have functionality that detects when a new release is started for the first time and makes necessary changes to the infobase (infobase data update).

If Standard Subsystems Library is used in the configuration, such functionality is provided by the "Infobase version update" subsystem.

If Standard Subsystems Library is not used in the configuration, see general requirements for getting started with the configuration below.

Best practices

2. The initial filling of the infobase can be divided into mandatory actions required for the configuration to function and non-mandatory actions, which are not necessary but improve user experience.

3. As soon as the infobase is processed upon initial start of the configuration or new release, we recommend that you display the configuration details or changes made to this configuration version to the administrator.

4. Situations when processing is not performed in the necessary volume must be controlled by the configuration. A warning message notifying a user of the issue must be displayed. To display a detailed report on performed operations and occurred errors, use the event log.

5. If the configuration supports distributed infobases, implement the logic of infobase data update in subordinate nodes so that:

  • It is performed after the updated data is loaded from the master node.
  • It prevents the same data from being reprocessed and new data from being regenerated. In other words, infobase reprocessing must function correctly.

Otherwise:

  • If new data is unconditionally generated upon updating a subordinate infobase node, this data is generated multiple times in each node of the distributed infobase and multiplied in all nodes upon the next data exchange.
  • If some data is unconditionally changed upon updating a subordinate infobase node, this data is registered for loading back into the master node. This leads to additional overload on communications link between nodes.

Incorrect:

ProfileObject = Catalogs.AccessGroupProfiles.CreateItem();
ProfileObject.Description = NStr("en = "Accountant");
ProfileObject.PresetAccessKind = True;
ProfileObject.Write();

Correct example:

ProfileDescription = NStr("en = "Accountant");
Query = New Query(
 "SELECT
 | TRUE
 |FROM
 | Catalog.AccessGroupProfiles AS AccessGroupProfiles
 |WHERE
 | AccessGroupProfiles.Description = &Description AND
 | AccessGroupProfiles.PresetAccessKind = TRUE");
Query.SetParameter("Description", ProfileDescription);
// If there is no item, create the new one.
If Query.Execute().IsEmpty() Then
  ProfileObject = Catalogs.AccessGroupProfiles.CreateItem();
  ProfileObject.Description = ProfileDescription;
  ProfileObject.PresetAccessKind = True;
  ProfileObject.Write();
EndIf;

 

© 2020 1C INTERNATIONAL LLC www.1Ci.com Support policy