Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
rasmuswulff_jensen
Active Contributor
0 Kudos


During the years I recently noticed that there have been some changes on what actually happens during an Application Shutdown and I've decided to do a little research on the subject. Since I've been working with the SDK for 3 years now it had been a long time since I tested it, and since I found a few unexpected results I've decided to share them with you (people new to SDK might already know all this).

History:
Before SAP Business One 2004A add-ons were launched is a very primitive way compared to the SBO2004A and future releases.
The add-ons were not registered in the company but using the regedit. This system was not very good for multiple databases since you were the one that needed to tell your addon if it should run on the current database. In SBO2004A it all changed and is the system we know now, but in the SDK the Application Event has not changed its syntax and that might be why some of the events in here actually never is fired.

The 4 possible events and their description in the SDK Help Center:

  • BoAppEventTypes.aet_CompanyChanged = Occurs when the Company database changes.

  • BoAppEventTypes.aet_LanguageChanged = Occurs when the interface language changes.

  • BoAppEventTypes.aet_ServerTerminition = <not documented anymore>

  • BoAppEventTypes.aet_ShutDown = Occurs when the SAP Business One application shuts down


While Add-on is running Application event receives the following events:
User action: If Add-on is manually stopped from Administration > Addons > Add-On Manager
Event fired: BoAppEventTypes.aet_ShutDown Event
Comments: As expected

User action: Change company
Event fired: BoAppEventTypes.aet_ShutDown Event
Comments: It has always been my belive that here I BoAppEventTypes.aet_CompanyChanged should happen, but since I always did the same thing for both companies changed and shutdown I've never expected this.

User action: Change language
Event fired: BoAppEventTypes.aet_LanguageChanged Event
Comments: As expected

User action: Close SAP Business One Client
Event fired: BoAppEventTypes.aet_ShutDown Event
Comments: As expected

User action: When the addon is closed by SAP during an Add-on Upgrade
Event fired: BoAppEventTypes.aet_ShutDown Event
Comments: As expected

User action: Close the UI API (taskbar icon right click > Exit)
Event fired: No events
Comments: I've would actually have guessed that all got a termination event or a shutdown event, but that is not the case.

My conclusion so far:
- There does not really seem to be any reason to call CompanyChanged or ServerTermination since they are not fired (I still do just in case I've missed something)

My open questions:

- Why is BoAppEventTypes.aet_ServerTerminition is not documented in SDK Help Center anymore (Is it not used because of the changes in SBO2004 on how addons is launched, but if that is the case, why is it not mentioned as deprecated)?
- Why is BoAppEventTypes.aet_CompanyChanged still documented in SDK Help Center as being launched when it is not (it should be marked as deprecated)?

 

1 Comment
Labels in this area