Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > DoQueryBox Does not Work

Forum

Search UsersRules
DoQueryBox Does not Work
#1
Active user
Points:: 3
Joined:: Sep 16, 2011

I'm trying to get a user confirmation when posting a document in the following way:

CloseOrder = DoQueryBox(NStr("en = 'Close this order?'"), QuestionDialogMode.YesNo, 0) <> DialogReturnCode.No;

And receive the following error:

{Document.CustomerOrder.ObjectModule(61,60)}: Variable is not defined (QuestionDialogMode)
CloseOrder = DoQueryBox(NStr("en = 'Close this order?'"), <<?>>QuestionDialogMode.YesNo, 0) <> DialogReturnCode.No; (Verification: Server)
{Document.CustomerOrder.ObjectModule(61,92)}: Variable is not defined (DialogReturnCode)
CloseOrder = DoQueryBox(NStr("en = 'Close this order?'"), QuestionDialogMode.YesNo, 0) <> <<?>>DialogReturnCode.No; (Verification: Server)
{Document.CustomerOrder.ObjectModule(61,15)}: Procedure or function with the specified name is not defined (DoQueryBox)
CloseOrder = <<?>>DoQueryBox(NStr("en = 'Close this order?'"), QuestionDialogMode.YesNo, 0) <> DialogReturnCode.No; (Verification: Server)

Profile
#2
Just came
Points:: 9
Joined:: Dec 6, 2011

You can use DoQueryBox only at client.
Use this code in BeforeClose or BeforeWrite event handlers of the form.

Profile
#3
Active user
Points:: 3
Joined:: Sep 16, 2011

Oh... My mistake. Thanks!

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.