Показать сообщение отдельно
Старый 02.09.2021, 10:33   #8  
oleggy is offline
oleggy
Участник
 
256 / 36 (2) +++
Регистрация: 03.12.2019
Адрес: Россия
Получилось только так:

X++:
static void job123(Args _args)
{
	...
	void updateFieldValue(Common _common, FieldId _fieldId, anytype _value)
	{
                DictField   dictField;
                DictTable   dictTable = new DictTable(_common.tableId);
                Common      common;
                ;
		...
		try
		{
			ttsBegin;
			common = dictTable.makeRecord();
			common.selectForUpdate(true);
			select common
				where common.RecId == _common.RecId;
			common.(_fieldId) = _value;
			ttsCommit;
		}
		catch
		{
			ttsAbort;
		}
		...
	}
	...
	;
	
	...
	updateFieldValue(APMParameters::find(), fieldnum(APMParameters, Field1), valueField1);
	...
}
За это сообщение автора поблагодарили: sukhanchik (2), SRF (1).