DoQueryBox Does not Work

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company: TLG Integration

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)

 
#2
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 6, 2011
Company:

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

 
#3
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company: TLG Integration

Oh... My mistake. Thanks!

 
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.