Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I am trying to understand the difference between update() and UpdateEntityDataSource() methods on the data entity.Could you please explain when to override update() and when to override updateEntityDataSource().
Update method is not related to any one data source.
UpdateEntityDataSource is related to specific data source.
Perhaps this helps you decide where to put your code?
Thanks Nikolaos. So if we have one datasource only in the entity i understand that we can write logic in insert/update and if we have multiple datasources we need to write the logic in insertentitydatasource/updateentitydatasource by respective datasource name. Please correct me here
It depends on your functional requirement = if you want to react to update on the entity level or single data source level.
If you have one data source you could use either one.
Try using updateEntityDataSource method always unless this method can't solve something that you can only do via update(). This will make sure your code is always in one place and you don't have to juggle between where and why. Going forward, if you want to add data source, you won't have to move your code around to account for another data source.
update() is called to update the whole entity. It internally calls many other methods, including updateEntityDataSource() for each data source.
Business Applications communities