Debug &AtServer and function DoMessageBox

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jan 14, 2013
Company:

Hello all.
I have code : It run versions 8.3.6.2041

Code
&AtClient
Procedure BeforeClose(Cancel, StandardProcessing)
   ChangeItem = BeforeCloseAtServer(); //debug
   If ChangeItem = True then
      DoMessageBox(NStr("en = 'item change';vi = 'Gia tri da thay doi'"));
   EndIf;
EndProcedure

&AtServer
Function  BeforeCloseAtServer()
   ChangeItem = False;
   If Write() and ThisObject.Items.Dvcs <> Metadata.Constants.Dvcs  then
      ChangeItem = True;         
   EndIf;
   Return ChangeItem;
EndFunction

When i  put debug &AtClient and &AtServer but it run atclient not run debug to atserver ?
And run function DoMessageBox at 1C Enterprise it error

Edited: P& A - Aug 06, 2015 08:05 AM
 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, P& A.

Would you please translate what is written on this error message into English?

Try replacing DoMessageBox() function with asynchronous ShowMessageBox().

If you have created a new infobase in 8.3.6, you have prohibited of using modal dialogs. This option is set in the configuration tree root.

 
#3
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jan 14, 2013
Company:

Hi Timofey.
Message : Prohibit use the Status window mode at this !
I used in thin client --> it's ok, 1C Enterprise it error
how can i do it ?

And i can't debug functon &AtServer when i put debug.

Edited: P& A - Aug 06, 2015 05:37 PM
 
#4
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 22, 2015
Company:

You can set modality usage mode in properties of configuration tree root: Properties -> Compatibility -> Modality usage mode

You also need to start 1C:Enterprise 8.3 Server Agent with -debug param to allow debug at server:
Control Panel -> Administrative tools -> Services -> 1C:Enterprise 8.3 Server Agent properties and change command line for it. For example
Before:
""C:\Program Files (x86)\1cv8\8.3.4.317\bin\ragent.exe" -srvc -agent -regport 1541 -port 1540 -range 1560:1591 -d "C:\Program Files (x86)\1cv8\srvinfo""
After:
""C:\Program Files (x86)\1cv8\8.3.4.317\bin\ragent.exe" -srvc -agent -regport 1541 -port 1540 -range 1560:1591 -d "C:\Program Files (x86)\1cv8\srvinfo" -debug"

Or you can do this with regedit
Find [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\1C:Enterprise 8.3 Server Agent\]
Find property "ImagePath"= , and add "-debug".
You need stop 1C:Enterprise 8.3 Server Agent before this changes and start after it

Edited: Valeriy Dyachenko - Aug 06, 2015 11:25 PM
 
#5
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jan 14, 2013
Company:

Hi all.
Thanks, i can do it.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.