A
A
Anton Misyagin2021-02-17 14:42:53
1C
Anton Misyagin, 2021-02-17 14:42:53

How to open a directory list form in 1C8.3 managed forms with a set selection (guaranteed with a set selection)?

I have a directory Counterparties
In 1C I have an open document MyDocument. The document has a DocumentAccount button. All other windows in the system are closed. I press it - the form of the list of the directory of Counterparties opens and the selection for the specified counterparty is set in it. Everything works as it should.

Everything works as described, if the Counterparties list form is not open somewhere in the background. In this case, when the button is pressed, the previously opened form of the list of Counterparties without the established selection or with the previously established selection pops up to the fore, without updating the selection on this form.

I give the code with which I open Counterparties

ПараметрыОтбора = Новый Структура;
  ПараметрыОтбора.Вставить("Контрагент", Объект.Контрагент.Ссылка);
   
  ПараметрыФормы = Новый Структура;
  ПараметрыФормы.Вставить("Отбор", ПараметрыОтбора);
   
  ОткрытьФорму("Справочник.Контрагенты.Форма.ФормаСписка", ПараметрыФормы);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sgr_A, 2021-02-17
@sunnmas

And if so:

ОткрытьФорму("Справочник.Контрагенты.Форма.ФормаСписка", ПараметрыФормы, , Истина);

K
Konstantin, 2021-02-17
@fosihas

Pay attention to this. Especially the owner
OpenForm(<FormName>, <Parameters>, <Owner> , <Uniqueness> ,
ps:
OpenForm("Directory.ResourceSpecifications.Form.FormSelectionByNomenclature", Structure, ThisForm);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question