DataLockItem.SetValue

Syntax:

SetValue(<LockNamespaceField>, <LockedValue>)

Parameters:

<LockNamespaceField> (required)

Type: String; ChartOfCharacteristicTypesRef..
A lock namespace field name. The following field names are supported:
  • For the InformationRegister namespace.<name>.DataSet - Recorder (only for register subordinated to a recorder;
  • For the InformationRegister namespace.<name> - Period (if any), <dimension name>, <separator name>;
  • For the AccumulationRegister namespace.<name>.DataSet - Recorder;
  • For the AccumulationRegister namespace.<name>- Period, <dimension name>, <separator name>;
  • For the AccountingRegister namespace.<name>.DataSet - Recorder;
  • For the AccountingRegister namespace.<name> - Period, <dimension name>, <register record type> (AccountingRecordType system enumeration value), Account, ExtDimensions<N>, <extra dimension type>, <separator name>;
  • For the CalculationRegister namespace.<name>.DataSet - Recorder;
  • For the CalculationRegister namespace.<name>- RegistrationPeriod, ActionPeriod, <dimension name>, <separator name>;
  • For the Recalculation namespace.<name>.DataSet - RecalculationObject;
  • For the Sequence namespace.<name>.DataSet - Recorder;
  • For the Sequence namespace.<name>.Records - Recorder, Period, <Dimension>;
  • For the Sequence namespace.<name> - <dimension name>, <separator name>;
  • For the Constant namespace.<name> field names are not supported;
  • ChartOfCharacteristicTypesRef. type - a lock is set on the AccountingRegister.<name> space.
For the namespaces below the Reference field is supported as well as all the fields specified in the "Data lock fields" of this metadata object:
  • Catalog namespace.<name>;
  • Document namespace.<name>;
  • ExchangePlan namespace.<name>;
  • ChartOfAccounts namespace.<name>;
  • BusinessProcess namespace.<name>;
  • Task namespace.<name>;
  • ChartOfCalculationTypes namespace.<name>;
  • ChartOfCharacteristicTypes namespace.<name>.

<LockedValue> (required)

Type: Arbitrary; Range.
A value (a range of values) for a lock space field.

Description:

Sets a value for the lock namespace field. The lock is imposed on records that contain the set value in this field.

Availability:

Server, thick client, external connection.

Note:

Please note that the same register record can be locked twice, first time by locking the record itself, second time by locking the set which contains the record.
It is not allowed to set one and the same lockspace field using methods SetValue and UseFromDataSource.

    

1C:Enterprise Developer's Community