• BobRoyAce
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

I have code like follows, to login/connect to Salesforce web services...

 

    _SalsesforceService = New SforceService

    _SalsesforceService.Timeout = 60000
    _LoginResult = _SalsesforceService.login(UserName, Password + SecurityToken)

 

This, of course, works great. 

 

However, if a lot of time goes by without communicating with Salesforce, the "connection" is no longer valid, and, if I try to make calls, I get errors.

 

So, the question is, how can I determine if the connection to the service has timed out, so that I can know if I need to reestablish the connection? Secondly, if it has timed out, do I just run _SalsesforceService.login(UserName, Password + SecurityToken) again to reestablish the connection?

 

Let's say that I want to grab a list of all of the acceptable picklist values that can be selected for a particular field of a particular object (e.g. Account.Type). What VB.NET code could I use to accomplish something like this? Ideally, what I'd like is a function like follows:

 

Public Function GetPicklistEntriesForObjectForField(ByVal sObjectName as string, ByVal sFieldName as string) as string()

 

End Function

 

How could I do this for standard objects (e.g. Account)? How about for custom objects (e.g. Owner__c)?

Let's say that I want to grab a list of all of the acceptable picklist values that can be selected for a particular field of a particular object (e.g. Account.Type). What VB.NET code could I use to accomplish something like this? Ideally, what I'd like is a function like follows:

 

Public Function GetPicklistEntriesForObjectForField(ByVal sObjectName as string, ByVal sFieldName as string) as string()

 

End Function

 

How could I do this for standard objects (e.g. Account)? How about for custom objects (e.g. Owner__c)?