DataLock

Collection elements:

DataLockItem
Iteration through collection using For each ... In ... Do operator is available to object. Elements of lock are retrieved during iteration.
Access to element of lock is possible using [...] operator. Index (starting from 0) is passed as an argument.

Methods:

Add
Count
Get
Lock

Constructors:

Default

Description:

Is intended for explicit data locking to protect it from reading or changing by other sessions.

Availability:

Server, thick client, external connection.
Exchange with server is possible. Serializable.

Example:

Blocking = New DataLock;
LockItem = Blocking.Add("AccumulationRegister.GoodsInStocks");
LockItem.SetValue("Quality", Catalogs.Quality.FindByCode("1"));
LockItem.Mode = DataLockMode.Exclusive;
LockItem.DataSource = DocumentObject.ReturnableContainer;
LockItem.UseFromDataSource("Nomenclature", "Nomenclature");
LockItem.UseFromDataSource("Stock", "Stock");
Blocking.Lock();


    

1C:Enterprise Developer's Community