In Syntax Assistant in ‘Datalock’ section there is the following script:
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();
We are setting lock on accumulation register fields for the ReturnableContainer tabular section of a document. Due to there is a SetValue method call, which sets a restriction by the Quality field, the lock will be applied only to records, having the Quality field equal to the reference to the Quality catalog item with code ‘1’. Here is the question: Will the lock be applied to all records having the Nomenclature ‘AND’ or ‘OR’ the Stock dimensions values, which are going to be set?