cancel
Showing results for 
Search instead for 
Did you mean: 

How to end an add on process

Former Member
0 Kudos

Hi,

Problem am facing currently is like this.

After i activate my addon, work on it and then exit from SAP, my addon process is not getting closed by itself. Thereby each time i activate my addon and exit from SAP my addon process that many number of threads are created and these process are not getting closed by itself whereby my server has turned slow and manually i need to go and end these process through coding...

Can any one help me out ..

Thanks

Mini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mini,

Catch the Application Event and close the process explicitly.

Private Sub objApplication_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles objApplication.AppEvent

If (EventType = SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged Or EventType = SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition Or EventType = SAPbouiCOM.BoAppEventTypes.aet_ShutDown) Then

System.Windows.Forms.Application.Exit()

End If

End Sub

Its better you do all clean up actions such as GC.Collect() etc. Even after that it exist, you need to try with threading.

HTH

B.Ravi Shankar

Answers (1)

Answers (1)

former_member185703
Active Contributor
0 Kudos

Hi Mini,

Did you ever look at the B1 SDK E-learning?

https://www.sdn.sap.com/irj/sdn/businessone-elearning

Here's the flashbook (in the intermediate courses) which answers this question - and more...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a1e85bf9-0901-0010-37ad-b2c...

Regards,

Frank

Message was edited by: Frank Moebius