Constants

As a rule, constants are used in 1C:Enterprise for storing information that is either unchanged or rarely changed in the course of system operations. Constants store information that characterizes an application task in general. The simplest example of this kind of information is a company name, which is usually not changed.
In the ConstantsManager program modules, an object is used to execute general actions with constants that are set in the designer (such as obtaining a form to manage constants, creating a set of constants). To simultaneously change the values of a certain constants group, the ConstantsSet object should be used. To read and record a value of a certain constant, the ConstantManager. object may be called.

Example:

//Receive constant value
Director = Constants.Director.Get();

// Set value
Constants.Director.Set("Jackson Peter Jr.");

// Processing the set of constants
ConstantsSet = Constants.CreateSet("Director,Bookkepper");
ConstantsSet.Read();
If 
IsBlankString(ConstantsSet.Director) Then
    ConstantsSet.Director  = "Jackson Peter";
EndIf
;
If 
IsBlankString(ConstantsSet.Bookkeeper ) Then
    ConstantsSet.Bookkeeper  = "Adams John";
EndIf
;
ConstantsSet.Write();


    

1C:Enterprise Developer's Community