cancel
Showing results for 
Search instead for 
Did you mean: 

How to Track System Message Event

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (5)

Answers (5)

Former Member
0 Kudos

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

Former Member
0 Kudos

U can download a software "SAP Business One Event Logger" from this website.After installing u can get detailed information of every event.

former_member209699
Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

We can Trace sql server profiler.

Regards.,

billa 2007

Former Member
0 Kudos

Hi Billa,

i cant get you clearly..

could you please explain in detail about Tracing sql server profiler.and how its interrelated with SAP System mesages..

regards,

Ganesh k

Former Member
0 Kudos

Ganesh,

I guess u can use the SP Transation notification (stored procedure) to know abt the success or failure of the DI operation.

Vasu Natari.