ValueStorage

Methods:

Get

Constructors:

Based on value

Description:

It is used to save the value in a special format. This value can be written to the database for fields of a certain type. This enables the user to save to a value database of a type that cannot be selected as a field type. For example, Picture.
The majority of objects having values that cannot be modified, as well as universal collections, can be placed to the ValueStorage value. A value stored in an object cannot be called up. It can only be removed from storage.
Object type descriptions than can be placed to the ValueStorage include text "Serialization".
Note. It is not recommended to store references to other database objects in ValueStorage attributes.

Important: The system does not support referential integrity for objects stored in a database in ValueStorage fields. This means that when, for example, the user attempts to delete directory elements, the system does not control any references to these elements, which are stored in ValueStorage.

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).
Exchange with server is possible. Serializable. The given object may be serialized to/from XML. Can be used in attributes of managed form. The given object may be serialized to/from XDTO. The XDTO type correspoding to this object is defined in {http://v8.1c.ru/8.1/data/core} namespace. XDTO type name: ValueStorage.

Example:

MyPicture = New Picture("C:\MyDocuments\Picture1.bmp");
PictureStorage = New ValueStorage(MyPicture);

NewNomenclature = Catalogs.Nomenclature.CreateItem();
NewNomenclature.Name = "Divan ""Margarita""";
NewNomenclature.Image = PictureStorage;
NewNomenclature.Write();

See also:

BinaryData, method Write

    

1C:Enterprise Developer's Community