The document contains details "Contact Person" and "Phone". It is necessary that when the contact person is changed, the phone is automatically inserted. The user chooses data from the directory "Contact Persons of Counterparties". I am writing a code, but nothing happens when I select a contact person in the field with the phone. Please help me:
&НаКлиенте Процедура КонтактноеЛицоПриИзменении(Элемент) КонтактноеЛицо = Объект.КонтактноеЛицо; Объект.Телефон = ПолучитьТел (КонтактноеЛицо); КонецПроцедуры &НаСервереБезКонтекста Функция ПолучитьТел (КонтактноеЛицо) Возврат КонтактноеЛицо.ОсновнойТел; КонецФункции