Showing posts with label Customization. Show all posts
Showing posts with label Customization. Show all posts

Delegates to customize Application startup


                            Application Startup Event Manager 



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

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

You can find those events to subscribe to 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.


Let's begin to verify the above delegates

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

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

  • onSessionCreated
  • onSystemStartup




Step-2 Create a table and insert 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 the 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 these steps systems startup event will raise 14 times.  You can check the number of records of SQL is 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 issues during the implementation of this blog 



 

Dimension Entry Control D365FO




Dimension entry control subpattern

SourceLink
This article provides information about the Dimension Entry Control sub pattern. This sub pattern is used when you have a group or tab page that uses the Dimension Entry control (DEC).

Usage

The Dimension Entry Control pattern is used when you have a group or tab page that uses the Dimension Entry control (DEC).

Wireframe



Lets Begin Example

First Create new project for demo purpose..

                                              

Step-1 - Create Custom Table

Step-2- Add Dimension Field and Extends with LedgerDefaultDimensionValueSet
Step-3- Make Relation with DimensionAttributeValueSet





Step-4-  Create New Form & Display Menu items and set the Form Name in the object property of the menu Item.



Step-5- Create New menu extension if you required and drag your Display menu item where you want to display.



Step-6-  Now Open the Form you created previously and drag the newly created table in the data source of your form.

Step-7- Now Add the Tab control and one Tab page with tab control and apply the Dimension Entry control pattern and set the properties like below screenshot.


Now Add two groups as per pattern requirement and set the properties 

First Group Properties
  • Frame Type =None
  • Hide if Empty =No

Second Group Properties
  • Arrange Method=Vertical
  • Auto Declaration=Yes
  • Hide if Empty =No



Now perform the build & sync 

Now login to D365FO and Open the newly created Form


Now Create new Record and enjoy Dimension Entry Control :)




Please feel free to contact me, if you are facing any issue to implement the above blog.



Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...