Hi All,
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().
Thanks
Venky
update() is called to update the whole entity. It internally calls many other methods, including updateEntityDataSource() for each data source.
Hi Venkat,
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.
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.
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
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?
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156