Answer the question
In order to leave comments, you need to log in
How to create the "FormDataTree" type on the server?
Good evening!
I had to poke my head into the unknown steppe.
In general, from a WebService (created, figured out, there are no problems in general), you need to call a function from the built-in processing manager module.
The problem is that, as I understand it, one of the parameters of the function requires the type "FormDataTree" (client, as I understand it, because "GetElements" is used inside), and "ValueTree" ( dz = New ValueTree; ) does not fits.
I need to somehow convert the Value Tree into "FormDataTree", and then back.
Provided that my code is "&OnServer" (because WebService).
I can’t change the processing, because configuration cannot be changed. It is not possible to make a copy of the same processing, because. it is very large + calls about a dozen other processing (where the same "FormDataTree" is used, in general, an ambush).
I wanted to try this, BUT:
дз = Новый ДеревоЗначений;
дфд = ??? Как создать с типом ДанныеФормыДерево?
ЗначениеВДанныеФормы(дз, дфд);
Answer the question
In order to leave comments, you need to log in
In general, I did it through XDTO packages, first I drove the DataFormTree into an XML file, saved it,
castrated the xml to a couple of lines for about three hours (because I didn’t like it in different versions for some reason), then
идиотизРЯК = Новый ЧтениеXML;
идиотизРЯК.УстановитьСтроку("1Ссникам страдать!");
деревоЗначенийКлиент = СериализаторXDTO.ПрочитатьXML(идиотизРЯК);
dfd = ??? How to create with type DataFormsTree?
Tell me, please, how to be?
Do not panic, you just need to suffer a little, and everything will work out!
&НаСервере
Процедура СоздатьНеСоздаваемое()
РеквизитФормыДерево = Новый РеквизитФормы("Дерево", Новый ОписаниеТипов("ДеревоЗначений"));
МассивДобавляемыхРеквизитов = Новый Массив;
МассивДобавляемыхРеквизитов.Добавить(РеквизитФормыДерево);
ИзменитьРеквизиты(МассивДобавляемыхРеквизитов);
ДеревоЗначений = Новый ДеревоЗначений();
ЗначениеВДанныеФормы(ДеревоЗначений, ЭтаФорма.Дерево);
КонецПроцедуры
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question