• John Saunders
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 34
    Replies

I started working with sforce this past August. Somehow, I've managed to be ignorant of the concept of 15-character ids until today.

I just found out that I can't compare two ids for equality using "==" if one of them comes from a web link. I could never have imagined that this problem could ever exist.  I'm certain that no other developer who worked on this code has imagined it either. I'm actually going to have to check all the code looking for comparisons of ids!

But, I should never have had to imagine it. This should have been documented in the API document, which I read back in August.

Would you please document this in the manual???

Worse, I've got to go explain why my code broke, and nobody is going to believe me without documentation of this ("what do you _mean_ you can't compare two strings?")

P.S.Here's a hint: any time  you change something that you can't imagine will impact developers - document it anyway! This protects against failures of the imagination.

I just ran a query (using sforce Explorer .NET version) for "select Id from AccountShare". This was for a large customer with nearly 2 million AccountShare records.

I did not receive a query timeout. I received a network timeout. I also tried the same thing with the API and confirmed that it is a network timeout by increasing the Timeout in the web service binding.

Is this the expected behavior? Under which circumstances should I expect a query timeout vs. a network timeout?

Yet another reason to find a better way to limit Developer accounts: I'm trying to test some code that uses the AccountTeamMember object. But with only two users, I can only have two AccountTeamMember objects per Account.

Since the customer requires some performance numbers before proceeding, it looks like we won't be proceeding...

John Saunders

 

The DescribeSObject call says that the Probability field is non-nullable. Yet, I'm seeing blank in this field both in the UI and in the partner API on an Opportunity which is in the "Closed/Won" stage.

Is it actually meant to be nullable? If so, are there any other fields like this which are really nullable but don't say so in the API?

John Saunders

 

Although the API reference mentions several fields of type "int", I don't see a way to create a custom field of that type. Did I overlook something?

Creating a field of type NUMBER(8,0) produces a double, which is not what I had in mind.

John

P.S., what I had in mind was a fixed-point, preferably integer, field to hold a unique integer id from a foreign database. I have this terrible fear of non-normalized floating-point numbers, or of the fact that there's more than one way to represent the number 1 as a double...

 

In testing an application, I found many AccountShare records where the AccountId field refers to deleted Account records. I thought that deleting an Account should have cascaded down and deleted the AccountShare records?

Is this normal, and is there some way I could programatically determine that the AccountId was bogus? I could use getDeleted to get the Id's of the last "n" days of Accounts, but would this AccountShare record still be there after the deleted Account ages out of the recycle bin (or the recycle bin is emptied)?

John Saunders

 

I can't believe that I have to either log in on each API call or else wrap every single API call in a loop with retry logic. I _must_ have missed something.

Also, what happens if I'm doing a long query:

result = binding.query(q);
while (!result.done){result = binding.queryMore();}

If I trap the session expiration with a try block around the queryMore, and if I then log in again, will I lose my place within the query?

Should we just make sure we don't take too long?

John Saunders

P.S. Sorry to sound so nasty, but I've been working on a program for the last two weeks, and it works just fine - as long as it doesn't take too long. It looks to me that in order to handle session expiration, I'll have to rearchitect the entire program!

I've found an OpportunityContactRole record with a blank LastModifiedById and CreatedById . These fields are marked as non-nillable in the result from describeSObject.

I would have thought that a non-nillable reference field would not be able to hold a blank value. Did I misunderstand?

John Saunders

 

I found that the ownerId field of the Group object as returned by describeSObject is said to be type reference, and the referenceTo value is just User. Yet I also find the ID of an Organization in that column.

Similarly, the UserId of QueueMember is said to refer to User, but I see it containing something with a "00G" prefix.

Can someone help me understand this?

John Saunders

 

I was just comparing the partner and enterprise WSDL files, and noticed the CallOptions SOAP header. Is that something currently implemented? If so, is there documentation on it?

John Saunders

 

A request I just heard about would have required custom display of several custom fields. These fields might depend on each other. One example would be paired dropdown lists, where the value of the first list determines the set of values available in the second list. This would want to display as two labels with the selected picklist values, but would want to be editable as two dropdown lists.

This could almost be done with a WIL pointing to a SControl, but this can't be done inline, and the SControl would have to update the SForce object on its own and not when Save is clicked (which is desirable).

What would be nice would be to specify in the page layout, that I want a particular SControl to be displayed at a particular place on the page, with a particular label and at a particular size. It would be necessary for the SControl to be able to contribute to the set of edited values to be saved on Save. I suppose that the SControl would have to set hidden fields which would be read on Save.

John Saunders

 

Hi

I am trying to add a  token t(hat we need to add to our integration config )that will allow Professional and Enterprise customers to use our integration.  I am trying to use a java  sample code

Here is a code

 

Here is a snippet of sample Java code to aid you in the understanding and use of your client id:

 

// The following snippet assumes use of the partner WSDL

// For use with sforce 3.0, 4.0, 5.0

// Use the following in your login method, before you call

// the login method.  Be sure to set the header value

// with your clientid.

// There exists a header object "_CallOptions" and setter method

// to insert the value.  See the WSDL definition for details.

// To insert the header value, set the call option for client id

// as follows:

_CallOptions co = new _CallOptions();

co.setClient("your_clientid_value");

 

// bind it to the current soap session

binding.SetHeader("SforceService", "CallOptions", co);

I have 2 questions:

1>Where exactly I need to use  to set token? will it be in my webservice where I am calling login function.

2>How can I use _CallOptions object? If I try to use it gives me an error type or namespace is not found.

Please Advice!!!!

 

Thanks,

Nupur

  • December 20, 2004
  • Like
  • 0

I started working with sforce this past August. Somehow, I've managed to be ignorant of the concept of 15-character ids until today.

I just found out that I can't compare two ids for equality using "==" if one of them comes from a web link. I could never have imagined that this problem could ever exist.  I'm certain that no other developer who worked on this code has imagined it either. I'm actually going to have to check all the code looking for comparisons of ids!

But, I should never have had to imagine it. This should have been documented in the API document, which I read back in August.

Would you please document this in the manual???

Worse, I've got to go explain why my code broke, and nobody is going to believe me without documentation of this ("what do you _mean_ you can't compare two strings?")

P.S.Here's a hint: any time  you change something that you can't imagine will impact developers - document it anyway! This protects against failures of the imagination.

I just ran a query (using sforce Explorer .NET version) for "select Id from AccountShare". This was for a large customer with nearly 2 million AccountShare records.

I did not receive a query timeout. I received a network timeout. I also tried the same thing with the API and confirmed that it is a network timeout by increasing the Timeout in the web service binding.

Is this the expected behavior? Under which circumstances should I expect a query timeout vs. a network timeout?

Hi,
How to check which fields that should not be empty in a table in sforce? Example, I get an error when I add a new contact with empty last name. Thanks.

sq

We'll be using this thread to discuss any possible regressions/issues with the 5.0 release.

    • One thing not mentioned in the release notes, but a change that was made: All IDs should now be returned as 18-character IDs. This was previously not the case, which was a bug as the WSDL defined ID to be 18 characters. If this has affected your integration, please post. Also, if you are doing any special handling for ID fields because their not 18-character you should post this info as well.


      Note that we will be rolling back this behavior for 4.0 and below, and 5.0 will always return 18 character ids. This is only the case for organization_id on the getUserInfo call. Rolled back on 11/15 for 4.0 and below apis


    • Running a query that returns more than batchSize records on OpportunityLineItem is failing. Fixed on 11/15

    • Address Label changes are causing problems for customers using Data Junction and XML/RPC. Please log a case if this issue is affecting you. These labels will be left with their new values.

    • The Web Integration Link URL for the API servers now returns the API pool. For example, this merge field: {!API_Enterprise_Server_URL_25} now returns na1-api.salesforce.com and not na1.salesforce.com. If you have a WIL that needs to return back to the detail page when it's done, you should use the detail page merge field. For example, on Opportunity this would be: {!Opportunity_Link}.


      There are also some scontrols that have stopped working because security settings only allows code to talk with the originating server. We are reverting this change, and a short-term fix is to hardcode the originating server url, such as na1.salesforce.com
      Patched 11/18


    • Calling retrieve when setting the batchSize header and the number of elements retrieved is larger than batchSize is causing unexpected_error faults for some entities. Patched on 11/18. However, there is still an issue if you are selecting a long binary column on an entity such as Attachment or Document. Patch pending

    • Retrieve used to always return id. Now it is only returning id if you request it. Short term workaround: adding id to your select list. Patched 11/18

    • Querying user on firstName or lastName will not return any rows. Patch release on 11/16 to api servers, on 11/18 to all servers.

    • A SOSL call on User that selects division will return an error. Example: FIND {Steve} RETURNING User(Division, Email). Workaround is to not select divison. Patched on 11/18

    • New fields: SystemModstamp was added to AssignmentRule, and SortOrder was added to OpportunityLineItem. New fields can appear in older versions of the API.

    • The WSDL generation page now respects field level security. Note that you must be an admin to even view this page, so you can always make fields hidden via FLS visibile. No change will be made here

    • Dates are now validated such that the year is between 1700 and 4000. This will be rolled back for 4.0 and below, and kept for 5.0. If you are requesting a date field using .NET, and the field is null, .NET turns that into 1/1/1. When sent back up, this is causing problems. This does not seem to be a problem for any other client. Patched on 11/18

    Message Edited by benjasik on 11-18-2004 07:45 PM

    Yet another reason to find a better way to limit Developer accounts: I'm trying to test some code that uses the AccountTeamMember object. But with only two users, I can only have two AccountTeamMember objects per Account.

    Since the customer requires some performance numbers before proceeding, it looks like we won't be proceeding...

    John Saunders

     

    The DescribeSObject call says that the Probability field is non-nullable. Yet, I'm seeing blank in this field both in the UI and in the partner API on an Opportunity which is in the "Closed/Won" stage.

    Is it actually meant to be nullable? If so, are there any other fields like this which are really nullable but don't say so in the API?

    John Saunders

     

    Although the API reference mentions several fields of type "int", I don't see a way to create a custom field of that type. Did I overlook something?

    Creating a field of type NUMBER(8,0) produces a double, which is not what I had in mind.

    John

    P.S., what I had in mind was a fixed-point, preferably integer, field to hold a unique integer id from a foreign database. I have this terrible fear of non-normalized floating-point numbers, or of the fact that there's more than one way to represent the number 1 as a double...

     

    I've found an OpportunityContactRole record with a blank LastModifiedById and CreatedById . These fields are marked as non-nillable in the result from describeSObject.

    I would have thought that a non-nillable reference field would not be able to hold a blank value. Did I misunderstand?

    John Saunders

     

    I tried creating web links but they do not seem to show up, for example, under "Studio - Customize - Accounts - Web Links".  I'm using the following VB.net code to do it:

            Dim webLink As New sforce.sObject
            Dim webLinkArray(0) As sforce.sObject

            Dim webLinkXmlElement(5) As Xml.XmlElement
            Dim webLinkXmlDoc As New Xml.XmlDocument

            webLinkXmlElement(0) = webLinkXmlDoc.CreateElement("LinkType")
            webLinkXmlElement(0).InnerText = "URL"
            webLinkXmlElement(1) = webLinkXmlDoc.CreateElement("Name")
            webLinkXmlElement(1).InnerText = "WIL from code"
            webLinkXmlElement(2) = webLinkXmlDoc.CreateElement("OpenType")
            webLinkXmlElement(2).InnerText = "Sidebar"
            webLinkXmlElement(3) = webLinkXmlDoc.CreateElement("PageEnumOrId")
            webLinkXmlElement(3).InnerText = "AccountDetail"
            webLinkXmlElement(4) = webLinkXmlDoc.CreateElement("Url")
            webLinkXmlElement(4).InnerText = "http://www.google.com"
            webLinkXmlElement(5) = webLinkXmlDoc.CreateElement("EncodingKey")
            webLinkXmlElement(5).InnerText = "Unicode (UTF-8)"

            webLink.type = "WebLink"
            webLink.Any = webLinkXmlElement

            webLinkArray(0) = webLink

            Dim sr() As sforce.SaveResult = binding.create(webLinkArray)

    Am I missing a field that is required?  I just started using the Parter WSDL, so I am still a bit unfamiliar with it vs. the Enterprise WSDL.

    Also, what are the valid values for EncodingKey?

    Any help would be appreciated.  Thank you.

     

    • September 17, 2004
    • Like
    • 0
    When I try to set UserPermissionsOfflineUser (or any of the UserPermissions fields), I get the following error:

    org.xml.sax.SAXException: Could not resolve ColumnType from FieldOrColumnCommon: Class
    common.udd.impl.BitVectorCommonImpl

    any ideas?

    thanks