X
X
Xris2021-05-26 11:33:11
1C
Xris, 2021-05-26 11:33:11

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

1 answer(s)
S
Sgr_A, 2021-05-26
@Sgr_A

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 question

Ask a Question

731 491 924 answers to any question