Answer the question
In order to leave comments, you need to log in
How to fill in the form details when creating a directory element programmatically?
How to fill in the form details when creating a directory element programmatically?
I am trying to implement in the following way but the values are not saved.
Спецификации = ЗагрузкаРесурснойСпецификацииEPLAN();
Для каждого Элемент Из Спецификации Цикл
П = Новый Структура("Ключ", Элемент);
Форма1 = ПолучитьФорму("Справочник.РесурсныеСпецификации.Форма.ФормаЭлемента",П);
ЗаполнитьЗначенияСвойств(Форма1,Форма1.Объект);
Форма1.ОсновноеИзделиеНоменклатура = Форма1.Объект.ОсновноеИзделиеНоменклатура;
Форма1.Модифицированность = Истина;
Форма1.Записать();
КонецЦикла;
Answer the question
In order to leave comments, you need to log in
Something you muddy the water. What is your goal? Form details are only interesting if you want to work with the form. For example, before opening it, initialize something. And here you seem to be trying to change the details of an element through the form. Put the question differently, what exactly do you need, what goal are you pursuing?
PS "The right question is already half the answer." (c)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question