Entity account = new Entity("account"); account.Attributes["name"] = "Sample Account"; account.Id = service.Create(account);
Entity account = new Entity("account"); account.Id = new Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); account.Attributes["name"] = "Updated Account Name"; service.Update(account);This code updates the name of an existing account record with the GUID "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" to "Updated Account Name". The package library for IOrganizationService is Microsoft.CrmSdk.CoreAssemblies. This package can be installed using NuGet in Visual Studio or downloaded from the Microsoft Dynamics CRM SDK website.