When i use Late-Bound everything works just fine;
But when i try to use Early-Bound nothing works (wether it is to update or create a completely new record)
//Entities.Contact contact = new Entities.Contact(); this DOES NOT WORK Entity contact = new Entity("contact"); DateTime birthdate = DateTime.Parse(postImage["birthdate"].ToString()); double age = (double)(DateTime.Today.Year - birthdate.Year) (double)(DateTime.Now.Month - birthdate.Month)/12; //contact.cpr_age = age; DOESNT WORK contact["cpr_age"] = age; contact.Id = postImage.Id; service.Update(contact);
i generated early bind using crmsvcutil exe with the command like in the documentation
and added the namespace, compiles fine no errors
but nothing happens in the CRM when i do the thing (for example here updating the age)
where could the problem be ?
i did not use toolbox to generate because the file does not compile from it (added nuget package of coreAssemblies)