Exit SAP Application
Hai To All,
While starting my addon iam checking some condition if it returns false i need to terminate the SAP application.
How to do that????
Petr Verner replied
ok, I tried it and functional solution for you is:
1. Add reference to your project for System.Diagnostics (Project - Properties - References and check System.Diagnostic)
2. Use this code for closing SAP
Dim Proc() As Process = Process.GetProcesses()
For Each p As Process In Proc
If InStr(p.ProcessName, "SAP Business One") Then
This works, I tested it now. Hope it helps.