The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Active user
Rating: 7
Joined: Jul 28, 2015
Company:

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);

Download Hata.JPG (135.17 KB)
 
#2
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

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

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