Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > when we must to use process which is using modal form on web browser we get an error

Forum

Search UsersRules
when we must to use process which is using modal form on web browser we get an error
#1
Active user
Points:: 0
Joined:: Jul 28, 2015

Hi everyone;

Sometimes, we have to use ModalForm on developing confiragiton. It's working very well on designer but when we need to publish configuration on web browser, modalform couldn't be called, doesn't work and give an error message.

How can we handle this?

I added here my configuration setting and error messages secreanshots.

Here is where got this error code.

Code
StandardProcessing = False;
   FrmStr             = New Structure();
   FrmStr.Insert("pDate",Begin);
   ModalResult = OpenFormModal("InformationRegister.Etkinlikler.RecordForm",FrmStr);

Profile
#2
Guest
Points::
Joined::

Hello, Mehmet Tuğrul SARIÇİÇEK.

Unfortunately, modal forms are not working well in web client because browsers require using asynchronous callbacks to improve user experience.

So, you should use NotifyOnCloseDescription parameter of the OpenForm function.

Here is an example from 1C:Subsystems Library:

Code
OpenForm("DataProcessor.ScheduledAndBackgroundJobs.Form.ScheduledJobExecution",,,,,, New NotifyDescription("OnStartEnd", ThisObject), FormWindowOpeningMode.LockWholeInterface);

...

Procedure OnStartEnd(Result, AdditionalParameters) Export
   
   If Result = "Restart" Then
      SkipExitConfirmation = True;
      Exit(False, True, " /C""" + LaunchParameter + """");
   EndIf;
   SkipExitConfirmation = True;
   Exit(False);

EndProcedure

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.