In multi-user data-aware applications it often occurs when a user modifies and saves a record that was edited by someone else. It is also possible that changes made by users do not intercept, e.g. one user modifies the task description, and another attaches a file to the same task. Now, WinForms XAF applications can correctly handle such a situation and merge changes made by different users in case they do not conflict. The video below demonstrates it in action.
To try the described functionality in the upcoming 13.1 version of XAF, add the following code to your Program.cs file.
staticvoid Main() {
DevExpress.Xpo.XpoDefault.TrackPropertiesModifications = true;
// ...
}
Important note:
It is required that the SetPropertyValue or OnChanged method taking both the old and new values is invoked in a persistent property setter to provide the correct tracking. If you use the Data Model Designer or Business Object Designer, then your properties are already implemented in the proper manner. If you implement your business objects in code, then follow XPO best practices - use one of the following invocations in setters:
SetPropertyValue("PropertyName", ref propertyValueHolder, value);
OnChanged("PropertyName", propertyValueHolder, value)
See also: Core - Support the Session.TrackPropertiesModifications option to allow data collisions resolving