• MazA
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
Hi everyone,
 
I've been using webservices to connect to salesforce (CRM) API for over a year now and today I added a new field 'Amount' to the salesforce and extracted the WDSLfile. On my local system running Window XP I did a Web References Update and everything worked fine. However, on our production server running Windows 2003 Server I got the following error message.
CS0117: 'site.sforce.Lead' does not contain a definition for 'Amount__c'
Ex.
...
lead.Description = Description;
lead.Amount__c = Amount;  // Only this fails. Works when I remove this line.
...
Why is that? Why on Windows 2003 Server and not on XP? I restarted IIS services as well too and still get the same problem.
Any suggestions?
 
Thanks
Maz.
 
Whenever I try to retrieve the LastModifiedDate field of an Account, I encounter the following error: "There is an error in XML document (1, 487)". I have no problems retrieving the other fields of the Account, though.
 
Any help will be appreciated. Thanks!
I am using C# to obtain case data from Salesforce in my application. I dont have any problems querying the rest of the case-related information.

When I run the following query:

QueryResult qr = binding.query("Select CreatedDate from Case where CaseNumber = '00003511'");

The following exception is thrown:

Message: There is an error in XML document (1, 477).
Trace:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlRea
der, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, St
ring encodingStyle)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
l)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
   at SFIncidentCaseData.sforce.SforceService.query(String queryString) in <path to project>\Web References\sforce\Reference.cs:line 678
   at SFIncidentCaseData.Program.GetIncidentCaseData(String strOrgName, String s
trStartCreatedDate, String strEndCreatedDate) in <path to source  file>:line 62

Any help is appreciated!

Thanks,
Prashanth
I made this sforce.query() call...
 

m_queryArray = oSFDCQuery.ExecuteQuery("select Support_Code__c, Name, CreatedByID, CreatedDate, Amount__c, Asset_Typ__c from Asset_Activity_Log__C where AccountID__c = '00130000005CZLD' ", oLogin);

With the "CreatedDate" in the query receive the following error...

"String was not recognized as a valid DateTime." as my inner exception

The Full Stack trace is as follows....

at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at SFDCLibrary.Sforce.SforceService.query(String queryString)

at SFDCLibrary.SFDCQuery.ExecuteQuery(String strQuery, cLogin oLogin)

at LicenceDetails.GetActivityLog() in s:\Projects\2005\AssetManager\LicenceDetails.aspx.cs:line 102

Now when i do not have "CreatedDate" everything works fine. And the query worked fine up until this morning when i made the following change. Thru SFDC setup i adjusted my custom object. I had  field i changed from numeric(7,0) to a text field.  I downloaded a new WSDL and deployed it.

Any ideas or suggestions to what i might have done wrong?

This problem has started in the last few days, with a long established program. On several objects the retrieve api call fails with "there is an error in XML document"

This is happening on account, case, contact, lead, opportunity and task objects (others appear OK). Also the error sometimes "goes away", the following is a partial trace:
TaskgetRecordDetail(1): Error: There is an error in XML document (1259, 22).
TaskgetRecordDetail(2): Error: There is an error in XML document (528, 45).
TaskgetRecordDetail(3): Error: There is an error in XML document (13050, 21).
TaskgetRecordDetail(4): Error: There is an error in XML document (3048, 6).
TaskgetRecordDetail(5): Error: There is an error in XML document (11611, 6).
TaskgetRecordDetail(6): Error: There is an error in XML document (14958, 6).
TaskgetRecordDetail(1): Error: There is an error in XML document (1337, 6).
TaskgetRecordDetail(2): Error: There is an error in XML document (14857, 5).
TaskgetRecordDetail(3): Error: There is an error in XML document (9781, 6).

My routine retries up to 10 times, primarily to compensate for network errors. But here the retry gives the same error but at a different points in the xml, finally getting a sucessful response.