on 09-01-2008 11:24 AM
Hi,
I created Form using Screen Painter. I want to make some validation on Form closing event.
How to Track for SAP system message (Do you want save changes? YES, No, Cancel) YES part. and i want to make some validation on that event.
Is it possible?
Regards,
Ganesh k
Dear Ganesh Karunakaran,
Please try solution as follwing sample code:
Private Sub SBO_Application_ItemEvent (.....
Dim res As Integer
Select Case pVal.EventType
......
Case et_FORM_CLOSE:
'// terminate the add on application
res = SBO_Application.MessageBox("test", 2, "OK", "Cancel")
If res = 1 Then
'//ok
ElseIf res = 2 Then
'//cancel
End If
End
End Select
End If
End Sub
Best Regards
Jane Jing
SAP Business One Forums team
Edited by: Jane Jing on Sep 2, 2008 4:40 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganesh,
You can catch the system message 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.
U can download a software "SAP Business One Event Logger" from this website.After installing u can get detailed information of every event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dim d As Integer = objMain.objApplication.MessageBox("Your message.", 1, "OK", "Cancel", "")
If (d = 1) Then
your code
else
exit
regards:
SANDY
Edited by: | Sandeep Saini | Roorkee | India on Sep 1, 2008 5:21 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can trap the system form (i think that the formtype is blank), but you cannot find out, if the user selected Yes or No.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
We can Trace sql server profiler.
Regards.,
billa 2007
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.