Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 214
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. 
  • fshaikh Profile Picture
    fshaikh 214 on at
    Data Events support for unmapped fields in D365 F&O Data Entity
     
    The Data event is triggered on the mapped field change. But the values of unmapped fields are coming empty, even though there is a logic written in PostLoad method to populate them. 
     
    Does it mean Post Load method do not run?
     
  • Waed Ayyad Profile Picture
    Waed Ayyad 6,502 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 500 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 230,503 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans