Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Data Events support fo...
Finance forum
Unanswered

Data Events support for unmapped fields in D365 F&O Data Entity

Posted on by 189
If there is a Data Entity is F&O, and it has a unmapped field in it. And if we are using Data Events in F&O, i know that the official documentation says that virtual fields are not supported. 
But, what if we populate that virtual field in the postLoad method of data entity. The Data Event trigger will run postLoad method of that data entity or not?
 
Thanks. 
  • Waed Ayyad Profile Picture
    Waed Ayyad 5,866 Super User 2024 Season 2 on at
    Data Events support for unmapped fields in D365 F&O Data Entity
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad
  • Raj Borad Profile Picture
    Raj Borad 432 on at
    Data Events support for unmapped fields in D365 F&O Data Entity
    Hi fshaikh,
     
    I just found some points regarding your question on the internet.
    • Virtual fields are not directly supported by Data Events in D365 F&O.
    • The postLoad method can be used to populate virtual fields, but this method does not trigger Data Events.
    • Data Events are triggered by changes to mapped fields in the database
    While you can use the postLoad method to populate virtual fields, this does not affect the Data Events directly. If you want to ensure that some logic is executed when a Data Event occurs, you should focus on the fields that are actually mapped and persisted in the database.
     
    public class YourDataEntity extends Common
    {
        public void postLoad()
        {
            super();
            // Populate the virtual field
            this.VirtualField = calculateVirtualField();
        }
        private YourVirtualFieldType calculateVirtualField()
        {
            // Logic to calculate the virtual field value
        }
    }
     
    Thank you,
    Raj D Borad
     
  • Martin Dráb Profile Picture
    Martin Dráb 229,129 Most Valuable Professional on at
    Data Events support for unmapped fields in D365 F&O Data Entity
    It depends. If you have a record where no field has changed (you just want to change the virtual field), there will be no data event triggered and no postLoad() called.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,802 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,129 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,154

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans