Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Re: Error when starting addon

$
0
0

You should capture the event for Shutdown, CompanyChange, ServerTermination. Here's my sample:

 

    Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent

        Try

            Select Case EventType

                Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown, _

                SAPbouiCOM.BoAppEventTypes.aet_ServerTerminition

                    'Release the resource and exit

                    RemoveMenus()

                    Application.Exit()

 

 

                Case SAPbouiCOM.BoAppEventTypes.aet_CompanyChanged

                    Application.Exit()

 

 

                Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown

                    SAP_APP.SetMessage("Add-on is Shutting down..", SAPbouiCOM.BoStatusBarMessageType.smt_Success)

                    Application.Exit()

 

 

            End Select

        Catch ex As Exception

            SAP_App.SetMessage(ex.Message, SAPbouiCOM.BoStatusBarMessageType.smt_Error)

        End Try

    End Sub


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>