• Brian.ax17
  • NEWBIE
  • 0 Points
  • Member since 2003

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 13
    Replies
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.

I've encountered some odd behaviour of the "includes" SOQL operator and would welcome opinions on whether there is a bug or this behaviour is by design.

I am executing a query with something like:
select id from object where afield includes('xyz') and bfield = 'something'

"afield" is a multi-select picklist, so includes is the only operation allowed. If the value 'xyz' is not in the picklist for afield, then all records in object are returned which match any other selection criteria. As soon as the value 'xyz' is added to the picklist fro afield, but not used in any record, then the query correctly returns no records.

In my real life situation, afield represents the user's role, and is deliberatly not included in the picklist, and the effect is that all records are process where in reality none should.

A possible work round would be to check the picklist values before executing the query, but unlike single select picklists, describe doesn't appear to return the picklist entries for multi-select picklists.

Brian

Just moved my .NET programs onto Windows 2003 Server from Win2K and have started getting the following error:
The underlying connection was closed: Could not establish secure channel for SSL/TLS

This happens apparently at random after logging on and processing queries, updates and inserts. The program gets further sometimes than others. Any suggestions as to what I should be looking for?

Thanks any pointers,

Brian

Through the web interface, you can assign Contract Approval requests to other users. I am trying to do a similar thing throught the API, but am encountering a problem.
 
    The problem is that I am not allowed by the API to set the OwnerId field, when using a standard user, but this field controls who the request is assigned to. I can set this field if I log in as an administrator, but the "created by" information then doesn't reflect who actually initiated the request (I can't set the createdbyID even as an administrator.) We can find no way to change the behaviour of the OwnerId field on the Approval object. The describe information confirms these restrictions.
 
    On most objects, it is reasonable not to be able to set the ownerId, but on the Approval object it has a different purpose and the default (creator id) is not useful.
 
Any suggestions on a work round or a change to the API in this area?
 
Thanks,
Brian
Through the
    The problem is that I am not allowed by the API to set the OwnerId field, when using a standard user, but this field controls who the request is assigned to. I can set this field if I log in as an administrator, but the "created by" information then doesn't reflect who actually initiated the request (I can't set the createdbyID even as an administrator.) We can find no way to change the behaviour of the OwnerId field on the Approval object. The describe information confirms these restrictions.
 
    On most objects, it is reasonable not to be able to set the ownerId, but on the Approval object it has a different purpose and the default (creator id) is not useful.
Through
    The problem is that I am not allowed by the API to set the OwnerId field, when using a standard user, but this field controls who the request is assigned to. I can set this field if I log in as an administrator, but the "created by" information then doesn't reflect who actually initiated the request (I can't set the createdbyID even as an administrator.) We can find no way to change the behaviour of the OwnerId field on the Approval object. The describe information confirms these restrictions.
 
    On most objects, it is reasonable not to be able to set the ownerId, but on the Approval object it has a different purpose and the default (creator id) is not useful.

Is there a limit to the number of records that the getUpdated method can return?

If this limit is 2000, say, and a change occurs, such as changing a picklist value of a field, which affects more than this number is a very short time span, how should this be handled?

There doesn't appear to be a similar method to queryMore, so looping to retrieve all changes or setting a smaller batch size is not an option here.

My thanks for any advice.

Brian

I understand that the sessionid goes stale after 2 hours, so I've coded calls to login after 45 minutes elapse time.

This seemed to work for the last few months, but in the last few days my program is failing just after 2 hours, despite 2 intervening login calls.

Any thoughts? Has something changed in the latest API update?

If I put a number in a Currency Type field, what Currency will the API assume this value to be in and how do I make sure it is in the Currency I intend?

If I do not place a value in the CurrencyISOCode, does the system assume the Currency of the logged in user or something else?

In the situation of Account record, would setting CurrencyISOCode to set "Annual Revenue" change the default currency for that Account (Account Currency)?

Is any of this written down anywhere?

Thanks,
Brian

I'm trying to add Cases from VB.Net using the 2.5 api. The program runs fine for small inserts and updates, but during the initial load (some 11,800 cases) an exception occured after 2,000 to 3,500 cases had been process:

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader

I eventually loaded all the records by removing those successfully processed from the local input table, and the routine looks to work happily on the daily incremental changes in the local source system.

However, I am likely to need to do more large data loads, so need to understand what is going wrong. Any thoughts why the Session ID should become invalid while processing large numbers of records?

Thanks,
Brian

Hi,

I've just downloaded the .NET Toolkit and installed it. (After removing the old version). Now I get the following when I start VS.NET:

Exception in sForce Add-in.

System.Runtime.InteropServices.COMException ()x800401F3): Invalid class string
  at EnvDTE.Windows.CreateToolWindow(Adinn AddinInst, String ProgID, String Caption, String GuidPosition, Object& DocObj)
  at sForce.Addin.Connect.CreateToolWindow()

followed by:

System.NullReferenceException: Object reference not set to an instance of an object.
  at sForce.Adin.Connect.CreateToolWindow()

Any suggestion?

Brian

Is there a Query sample which includes construction of the "NOT" operation?

I'm trying to construct a filter something like: firstName starts with "abc" and NOT lastName contains "xyz"

My attempts so far result in "value of filter criterion for not must be of type struct".

I'm using VB.Net to create Opportunities from an in house source system. I first use the query api to see if an opportunity already exists for an account and close date. If no opportunity exists, I insert a new record for the same account and close date.

Now that the GMT+ problem has been resolved, this works fine. Re-running the code only adds new transactions in the source system.

Except for close date 12/06/2004 (June, UK format) which appears in Salesforce as 11/06/2004. Re-running the code adds another record for the wrong date. Other dates process correctly. Since close date is a date only field, I would not expect timezone to enter into things (Mid-night UK still being the previous day in US). Of the dates I've tried, 12/06 is the only ambiguous date, compared to 20/12 or 29/11.

Any thoughts?

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.

I've encountered some odd behaviour of the "includes" SOQL operator and would welcome opinions on whether there is a bug or this behaviour is by design.

I am executing a query with something like:
select id from object where afield includes('xyz') and bfield = 'something'

"afield" is a multi-select picklist, so includes is the only operation allowed. If the value 'xyz' is not in the picklist for afield, then all records in object are returned which match any other selection criteria. As soon as the value 'xyz' is added to the picklist fro afield, but not used in any record, then the query correctly returns no records.

In my real life situation, afield represents the user's role, and is deliberatly not included in the picklist, and the effect is that all records are process where in reality none should.

A possible work round would be to check the picklist values before executing the query, but unlike single select picklists, describe doesn't appear to return the picklist entries for multi-select picklists.

Brian

Through the
    The problem is that I am not allowed by the API to set the OwnerId field, when using a standard user, but this field controls who the request is assigned to. I can set this field if I log in as an administrator, but the "created by" information then doesn't reflect who actually initiated the request (I can't set the createdbyID even as an administrator.) We can find no way to change the behaviour of the OwnerId field on the Approval object. The describe information confirms these restrictions.
 
    On most objects, it is reasonable not to be able to set the ownerId, but on the Approval object it has a different purpose and the default (creator id) is not useful.

Is there a limit to the number of records that the getUpdated method can return?

If this limit is 2000, say, and a change occurs, such as changing a picklist value of a field, which affects more than this number is a very short time span, how should this be handled?

There doesn't appear to be a similar method to queryMore, so looping to retrieve all changes or setting a smaller batch size is not an option here.

My thanks for any advice.

Brian

If I put a number in a Currency Type field, what Currency will the API assume this value to be in and how do I make sure it is in the Currency I intend?

If I do not place a value in the CurrencyISOCode, does the system assume the Currency of the logged in user or something else?

In the situation of Account record, would setting CurrencyISOCode to set "Annual Revenue" change the default currency for that Account (Account Currency)?

Is any of this written down anywhere?

Thanks,
Brian

I'm trying to add Cases from VB.Net using the 2.5 api. The program runs fine for small inserts and updates, but during the initial load (some 11,800 cases) an exception occured after 2,000 to 3,500 cases had been process:

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader

I eventually loaded all the records by removing those successfully processed from the local input table, and the routine looks to work happily on the daily incremental changes in the local source system.

However, I am likely to need to do more large data loads, so need to understand what is going wrong. Any thoughts why the Session ID should become invalid while processing large numbers of records?

Thanks,
Brian

Hi,

I've just downloaded the .NET Toolkit and installed it. (After removing the old version). Now I get the following when I start VS.NET:

Exception in sForce Add-in.

System.Runtime.InteropServices.COMException ()x800401F3): Invalid class string
  at EnvDTE.Windows.CreateToolWindow(Adinn AddinInst, String ProgID, String Caption, String GuidPosition, Object& DocObj)
  at sForce.Addin.Connect.CreateToolWindow()

followed by:

System.NullReferenceException: Object reference not set to an instance of an object.
  at sForce.Adin.Connect.CreateToolWindow()

Any suggestion?

Brian

Is there a Query sample which includes construction of the "NOT" operation?

I'm trying to construct a filter something like: firstName starts with "abc" and NOT lastName contains "xyz"

My attempts so far result in "value of filter criterion for not must be of type struct".

I'm using VB.Net to create Opportunities from an in house source system. I first use the query api to see if an opportunity already exists for an account and close date. If no opportunity exists, I insert a new record for the same account and close date.

Now that the GMT+ problem has been resolved, this works fine. Re-running the code only adds new transactions in the source system.

Except for close date 12/06/2004 (June, UK format) which appears in Salesforce as 11/06/2004. Re-running the code adds another record for the wrong date. Other dates process correctly. Since close date is a date only field, I would not expect timezone to enter into things (Mid-night UK still being the previous day in US). Of the dates I've tried, 12/06 is the only ambiguous date, compared to 20/12 or 29/11.

Any thoughts?

Hi,

Im trying to develope an application in .NET environment with SForce API. While trying to run the code downloaded from sForce.com in VB.NET the following error is shown

The server returned the following fault information:

Fault Code: 0

Fault string: invalid date format: 0001-01-01T00:00:00.0000000+0530

The program '[1636] QueryFilter.exe' has exited with code 0 (0x0).

The Function where the error is reported is reproduced for your reference: (class clsSForce.vb in QueryFilter_2003 Sample Code for VB.NET)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Friend Function SampleQueryFilter_Simple(ByVal SelectList() As String) As Boolean

Dim ret() As Object

Dim filter(0) As Object 'Final filter array

'Create simple filter

filter(0) = MakeSimpleFilter("ownerID", MyID, "equals")

Try

ret = sForce.query("filter", "contact", 20, SelectList, filter, Nothing, Nothing, False)

Catch ex As System.Web.Services.Protocols.SoapHeaderException

'This is typical error handling for fault detection and reporting, the .Net Proxy client actually throws an

'error rather than return the fault SOAP Message.

Trace.WriteLine("The server returned the following fault information:")

Trace.WriteLine("Fault Code: " & CType(CType(ex, System.Web.Services.Protocols.SoapException).Code, System.Xml.XmlQualifiedName).Name())

Trace.WriteLine("Fault string: " & ex.Message)

Return False

End Try

Try

Dim i As Integer = 1

Dim j As Integer

Dim rootNode As System.Xml.XmlElement = ret(0)

If rootNode.InnerText.Length > 0 Then

Dim children As System.Xml.XmlNodeList = rootNode.SelectNodes("valueMap")

Dim valueNode As System.Xml.XmlNode

For Each valueNode In children

Console.WriteLine("record " & i)

For j = SelectList.GetLowerBound(0) To SelectList.GetUpperBound(0)

Console.Write(vbTab & SelectList(j) & ": ")

Dim textNode As Xml.XmlNode = valueNode.SelectSingleNode(SelectList(j))

If Not textNode Is Nothing Then

Console.Write(valueNode.SelectSingleNode(SelectList(j)).InnerText)

Else

Console.Write("")

End If

Console.WriteLine(", ")

Next

Console.WriteLine(" ")

i += 1

Next

Return True

Else

Return False

End If

Catch ex As System.Exception

System.Diagnostics.Trace.WriteLine("Unexpected error: " & ex.Message)

Return False

End Try

End Function

++++++++++++++++++++++++++++++++++++++++++++++++++++

Please help
Vineet Gogia