Full width home advertisement

Post Page Advertisement [Top]



In Dynamics AX 2012, there are some customization points that allowed us to subscribe event Application.Startup delegate those were raised when the client was initializing.

But in D365 those events were deprecated and introduce some new events to customize the application startup as per your requirement..

You can find those events to subscribe in class  ApplicationStartupEventManager  



onSystemStartup()

  • This event occurs when the system starts up and Its raised once per AOS startup.

 onFirstTimeUserInteractiveSessionCreated()

  • This event occurs when the system is creating an interactive session for the first time for a user.

 onFirstTimeUserNonInteractiveSessionCreated()

  • This event occurs when the system is creating a non-interactive session for the first time for a user.

onInteractiveSessionCreated()

  • This event occurs when an interactive session is created and ready for use.
  • It is raised once per interactive session creation for any user.

onSessionCreated(boolean _isBatch, boolean _isInteractive)

  • This event occurs when the session is created and ready for use.
  • It is raised once per interactive session creation for any user.
  • _isBatch specifies whether the system is running a batch job.
  • _isInteractive specifies whether the session is interactive.


Lets begin to verify above delegates

To verify the delegates we will logs these events into a table.

Step-1 Create a class and subscribe the delegate in this demo i have subscribed only two delegates.

  • onSessionCreated
  • onSystemStartup


Step-2 Create a table and insert the anything to verify that events are working or not.



Step-3 Stop the IIS and Batch services.
Step-4 Build & Sync model or project.
Step-5 Verify records on newly created table using SQL.



Step-6 Restart The IIS services.  On this step systems startup event will raise Once.

Step-7 Start Batch service. On this steps systems startup event will raise 14 times.  You can check the number of records of SQL are 15


Step-8 Login On D365.  On this step session created event will raise.
Step-9 Verify records on newly created Table using SQL.


Please let me know if you are facing any issue during implementation of this blog 



 

Tidak ada komentar:

Posting Komentar

Bottom Ad [Post Page]