Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > ShowQueryBox

Forum

Search UsersRules
ShowQueryBox
#1
Just came
Points:: 0
Joined:: Nov 5, 2011

Hi,

The user is notified before the deletion
How can use ShowQueryBox

Code
&AtClient
Procedure ListBeforeDeleteRow(Item, Cancel)
   Answer = DoQueryBox("....?", Mode, 0);
   If Answer = DialogReturnCode.No Then
      Cancel= True;
   EndIf;      
EndProcedure

Profile
#2
Active user
Points:: 0
Joined:: Apr 18, 2012

Hi.

It's little complicated in an asynchronous mode.

Here is an example:

Code
&AtClient
Procedure ListBeforeDeleteRow(Item, Cancel)
   Cancel = True;
   ShowQueryBox(New NotifyDescription("ListBeforeDeleteRowEnd", ThisObject), NStr("en = 'Delete row?'"), QuestionDialogMode.YesNo);
EndProcedure

&AtClient
Procedure ListBeforeDeleteRowEnd(QuestionResult, AdditionalParameters) Export
   If QuestionResult = DialogReturnCode.Yes Then
      Row = Object.List.FindByID(Items.List.CurrentRow);
      Object.List.Delete(Row)
   EndIf;
EndProcedure

Profile
#3
Just came
Points:: 0
Joined:: Nov 5, 2011

Thank you so much

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.