on 10-07-2008 7:31 AM
I would like to delete data prompts the user Yes/No?
When click "Yes" confirm delete, click "No" cancel delete.
What to do?
Please provide code?
Thanks very much!!!
I want use the System Menu to delete the data to prompt the user.
I should add it in which SBO_Application event?
"ItemEvent or AppEvent or FormDataEvent or MenuEvent"
Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Youbing You
You need to post code to call Confirm(...) in the ItemEvent
Public Sub ManageItemEvent( _
ByVal FormUID As String, _
ByRef pVal As SAPbouiCOM.ItemEvent, _
ByRef BubbleEvent As Boolean _
) Handles SBO_Application.ItemEvent
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
Select Case pVal.ItemUID
Case "1" ' Ok, Confirm operation
If Not pVal.BeforeAction Then
BubbleEvent = Confirm(...)
End If
End Select
End Select
End Sub
Regards
Sierdna S.
Hi
Use this
If Confirm("DO you want do do this operation ?") Then
' Do it
Else
' Don'not do it
End If
...
Private Function Confirm(ByVal sMessage As String) As Boolean
On Error Resume Next
Confirm = False
Dim i As Integer
i = SBO_Application.MessageBox(sMessage, 2, "Yes", "No")
Select Case i
Case 1 ' Yes
Confirm = True
Case 2 ' No
Confirm = False
End Select
On Error GoTo 0
End Function
Regards
Sierdna S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It was a system message.
You can catch it like this :
if (pVal.FormType == 0 && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
{
SAPbouiCOM.Item oItem;
SAPbouiCOM.Button oButton;
oForm = SBO_Application.Forms.Item(pVal.FormUID);
oItem = oForm.Items.Item("1");
oButton = (SAPbouiCOM.Button)oItem.Specific;
oItem.Click(SAPbouiCOM.BoCellClickType.ct_Regular);
}
Hope it's help you
Regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.