Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

IOrganizationService.update(entity ) is Deleting the Object instead of Updating Entity object.

$
0
0

Hello All,

I am to Update the Entity Record ,Using IOrganizationService.Update() ,When I try  to Update the Object ,I dont getting Any error,It executing without any issue.

I am using Xrm(early bound)

I have Entity Called "amc01_employeetest"  it Custom Entity .I written Following code 

Protected  void  update ()

{

private static IOrganizationService _IOrgService;
static CrmServiceClient crmServiceClient;

crmServiceClient = new CrmServiceClient(ConfigurationManager.ConnectionStrings["CRMServer"].ToString());

_IOrgService = crmServiceClient.OrganizationWebProxyClient != null ? (IOrganizationService)crmServiceClient.OrganizationWebProxyClient : (IOrganizationService)crmServiceClient.OrganizationServiceProxy;

var x = radGridEmployee.MasterTableView.Items[e.Item.ItemIndex];
amc01_employeetest employeeTestUpdate = new amc01_employeetest();

employeeTestUpdate.amc01_name = txtLastName.Text;
employeeTestUpdate.amc01_LastName = txtName.Text;
employeeTestUpdate.Id = new Guid(x["amc01_employeetestId"].Text);

_IOrgService.Update(employeeTestUpdate);

}

Please help me out what is Mistake here and I tried with "ServiceContext" it Happens Same.


Viewing all articles
Browse latest Browse all 79901

Trending Articles