How to update a CRM 2011 Entity using LINQ in a Plugin?

We are able to create new entities without any issues, but updating an existing entity in a plugin this does not appear to be working. This is for CRM 2011.

var crmContext = new CustomCrmContext(service);

var contact = crmContext.Contact.FirstOrDefault(c=>c.Id == targetEntity.Id);

contact.new_CustomField = "Updated";

crmContext.SaveChanges();
11
задан Guido Preite 25 May 2013 в 22:59
поделиться