This may be in the way that Service Manager runs. I noticed that sometimes when you apply a change it does not reload the form. This causes a problem with certain things. I have especially noticed this with our routing incidents to our regional technicians when the incident tier is changed. They try to change the assigned to field and get an error because of the workflow has already changed the data and it did not update on the incident form unless it's reloaded.
Ron Taylor(774) 264-8502 From: [email protected] To: [email protected] Subject: [servman] Data Modification Collisions from Console Tasks Date: Fri, 21 Jun 2013 21:21:41 +0000 Hello, I have a custom C# console task that is targeted towards incidents. When the task runs, it updates a field on the incident. This works great when the console task is run on an incident by selecting the incident in a simple incident grid view in the console. However, the console task also appears as a task on the Incident edit form. When a user applies changes to an incident and then tries to run this console task, we get a DiscoveryDataModificationCollisionException. I see only two ways to avoid this: 1. Prevent the console task from appearing as a task on the incident edit form. How would I do this? 2. Find a different way to update the field on the incident than the way I am doing now. Am I doing the update the wrong way? My update code looks like this public override void ExecuteCommand(IList<NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection<string> parameters) { var node = nodes[0]; EnterpriseManagementObject emo = node["$EMOInstance$"] as EnterpriseManagementObject; IList<ManagementPackProperty> properties = emo.GetProperties(); emo[properties.Where(p => p.Name == "<fieldtoupdate>").First()].Value = "<newvalue>"; emo.Commit(); this.RequestViewRefresh(); } Thanks! Brandon Ryan Software Engineer | [email protected] ClearPointe® | 7 Office Park Dr., Suite 200 | Little Rock, AR | www.clearpointe.com MANAGED IT SERVICES: Your IT. Our People. 24/7. Guaranteed.
