Answered by:
when I am trying to update a contact entity I am getting error as Server was unable to process

Question
-
when I am trying to update a contact entity I am getting error at following line
service.Update(contact);as
Server was unable to process and
[SoapException: Server was unable to process request.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 Microsoft.Crm.SdkTypeProxy.CrmService.Update(BusinessEntity entity) +96
Monday, January 25, 2010 6:39 AM
Answers
-
i think you created the guid but did not assign it to the contact object.
you missed this line.
contact.contactid.value = ContactGuid;
Here is your code, you can see the assignement of the Guid is missing.
contact.contactid =
// The contactid.Value is the GUID of the record to be changed.
Guid contactGuid = new Guid("EC48E966-7209-DF11-B226-0016E69ACCB4")
contact.contactid.value = ContactGuid; // Add this line to your code
service.Update(contact);- Proposed as answer by Mayank Pujara Monday, January 25, 2010 9:11 AM
- Marked as answer by PramodPandey Monday, January 25, 2010 10:29 AM
Monday, January 25, 2010 8:55 AM
All replies
-
Can u paste the code, you are using to update your contact. or catch teh SoapException and find the detailed Error message to find the exact error.Monday, January 25, 2010 7:42 AM
-
error : 0x80040203
and code is as follows -
try
{
// Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0;
token.OrganizationName =
"BsilMktg";
CrmService service = new CrmService();
service.Url =
"http://mdt636:5555/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.
CredentialCache.DefaultCredentials;
// Create the contact object.
contact contact = new contact();
// Set the contact object properties to be updated.
contact.address1_line1 =
"34 Market St.";
contact.address1_country =
"INDIA";
contact.emailaddress1 =
"pkpmdp@gmail.com";
// The contactid is a key that references the ID of the contact to be updated.
contact.contactid =
new Key();
// The contactid.Value is the GUID of the record to be changed.
Guid contactGuid = new Guid("EC48E966-7209-DF11-B226-0016E69ACCB4");
// Update the contact.
service.Update(contact);
}
catch (System.Web.Services.Protocols.SoapException ex)
{
Response.Write(GetErrorCode(ex.Detail));
}
Monday, January 25, 2010 8:41 AM -
Try to replace lines
catch (System.Web.Services.Protocols. SoapException ex)
{
Response.Write(GetErrorCode(ex.Detail));
}
with lines
catch (System.Web.Services.Protocols. SoapException ex)
{
Response.Write(ex.Detail.InnerText);
}
Truth is opened the prepared mind
My blog (english)
Мой блог (русскоязычный)Monday, January 25, 2010 8:52 AMModerator -
i think you created the guid but did not assign it to the contact object.
you missed this line.
contact.contactid.value = ContactGuid;
Here is your code, you can see the assignement of the Guid is missing.
contact.contactid =
// The contactid.Value is the GUID of the record to be changed.
Guid contactGuid = new Guid("EC48E966-7209-DF11-B226-0016E69ACCB4")
contact.contactid.value = ContactGuid; // Add this line to your code
service.Update(contact);- Proposed as answer by Mayank Pujara Monday, January 25, 2010 9:11 AM
- Marked as answer by PramodPandey Monday, January 25, 2010 10:29 AM
Monday, January 25, 2010 8:55 AM