Answer the question
In order to leave comments, you need to log in
How to programmatically call the selection procedure from the directory in the usual form 1C 8.2?
I've already broken my head.
There is a document form, in it the field - DirectoryReference.Bolts
The task is to check whether the size of the bolt matches the size of the nut.
I made the procedure OnChange, but it works only once. If, after clicking No in the dialog and selecting the wrong bolt again, it ends up in the document without being checked.
I suspect that I am calling the selection box from the Bolts directory incorrectly. But I can't find a working solution. Or does it not exist at all?
Thank you in advance for your response.
Answer the question
In order to leave comments, you need to log in
1) Do not open the selection form programmatically, and after notifying the user about the error, offer to make this choice himself.
2) Open the form modally and get the result into a variable, which is immediately processed or thrown into the property of the object and call the same function (recursion).
3) Use the SelectHandling form handler, which is called after the select event in the subform (when getting your select form, you need to specify the current form as the owner).
More designs
Процедура ПолеВводаНачалоВыбора(Элемент, СтандартнаяОбработка)
// Запретить стандартную обработку.
СтандартнаяОбработка = Ложь;
// Получить форму выбора справочника как подчиненную полю ввода.
ФормаВыбора = Справочники.Номенклатура.ПолучитьФормуВыбора( , Элемент);
// Открыть полученную форму
ФормаВыбора.Открыть();
КонецПроцедуры
Форма = Отчеты.ОтчетДиаграмма.ПолучитьФорму("ФормаОсновная", ЭтаФорма);
Форма.ПоложениеОкна = ВариантПоложенияОкна.НеПерекрыватьВладельца;
Форма.Открыть();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question