Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
Can you please let me know what is the difference between method and event in table in D365FO.
Kindly give me an real time example.
Please give me more shed on this.
Maybe this will be helpful
This docs.microsoft.com/.../customization-overlayering-extensions article explains Events are raised as preceding and succeeding operations around the base methods. This means that you have the opportunity to run code before a base method is called and after it has completed. Microsoft Dynamics AX 2012 introduced XPP events, which are also available in this release and can be subscribed to in your extensions. have a look at the full article that might help understand.
Hope this helps!
Event handlers can be used to fire up our code without the necessary to customize and interfere on core logic and elements.
Look at the following example:
We create a new field in InventJournalTrans.Extension that extends the base package element InventJournalTrans table. We copy the event handler of the method on ModifiedField and copy it in our custom class.
public static void InventJournalTrans_onModifiedField (Common sender, DataEventArgs e)
The DataEventHandler specifies the source of the event (the table InventJournalTrans) and DataEventType is an enum for the type of event supported. Once the event arguments are received, we get field ID to call our logic.
In summary, a table method contains the business logic that is related to a table. We usually encapsulate actions in methods on the table to keep our code clean.
While an event is used to customize our application code without overlayering the base package application objects.
Business Applications communities