1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. 1C:Enterprise Development Standards
  3. Code conventions
  4. Using applied objects and universal value collections

Using an object module, an object manager module, and common modules

  • Using applied objects and universal value collections
    • Search in value collections
    • Using the InformationRegisterRecordsManager object
    • Copying rows between value tables (tabular sections, etc.) with arbitrary structure
    • Document register records recording procedure
    • Getting presentations for reference values in a spreadsheet document
    • Creating applied objects programmatically
    • Using an object module, an object manager module, and common modules
    • Restrictions on the use of export procedures and functions
    • Setting the selection parameters and relations between them for the metadata objects
    • Using FormAttributeToValue and FormDataToValue
See more

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

Best practices

1. Use object modules to implement behavior of particular object instances (CatalogObject, DocumentObject, and other). Object modules include procedures and functions that manage the object data (ThisObject and object module variables), including when it is not written to the infobase yet.

For example, the following objects can be placed in object modules:

  • Object event handlers
  • Object instance filling procedures

Note that whenever you need to call export procedures and functions of the object module from other modules, you might need to preliminary get an object instance from the infobase using the GetObject method. In this case, the whole object with its tabular sections is imported from the infobase. It is a resource-consuming operation. 

See also: Reading separate object attributes from the database

2. Use object manager modules to place static functionality that is logically linked to a metadata object but does not depend on a particular data object instance state. These might be the following procedures and functions:

  • Procedures and functions related to a collection of objects, rather than a single object. For example, these are functions to print out a list of objects, return information that is common for all metadata object instances, procedures to update infobase data related to a metadata object, and other.
  • Procedures and functions that manage an object written to the infobase. In these functions, an object reference is used as an input parameter. For example, these are functions to get print forms by an object reference, procedures used to generate register records by an object reference, and other. 

To execute object manager module functions, no data object instance is required (CatalogObject, DocumentObject, and other).

3. If a functionality cannot be referred to a particular metadata object, it is considered logically common for several objects. In this case, place it in a common module.

 

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