function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jtatejtate 

A couple of questions from a .Net n00b

What do I use to open up the HX* files that were installed with the developer toolkit for VS .Net 2003? Is that information the same as the CHM file at http://www.salesforce.com/us/docs/sforce_API_reference_manual.chm ? Is there another place I can go for more VB information? Is there a way to get a printed version of the fields available through the sForce Browser?

Is there any sample code on how to use the sforce.WindowsControlLibrary? There's a LoginControl that could be useful, but none of the sample apps seem to use it.
DevAngelDevAngel

Hi jtate,

The help system is integrated into the Visual Studio IDE.  You should not need to open any of the files independently.  In fact, these help files are not usable outside of the IDE.

The chm file on the website is the same.  For the fields, you can download the pdf version of the documentation from the sforce web site.  This has an erd of the standard entities and fields.

The sforce.WindowsControlLibrary was never completed, by may still have some use.  Here is some sample code that shows one use.  To create this sample just create a new windows forms project.  Make sure the sforce Developer Toolkit for Visual Studio .NET 2003 is started.  (You could alternatively select File/New/Project and from the Project Types list select sForce Projects/Visual Basic Projects and pick the Windows Application template. This will setup the environment for you, but is not required.)

Add the login control and a datagrid to the form.  Use the code below to on the form.  The Module declaration at the bottom is to illustrate how you might leverage the login connection at the application scope rather than just at the form scope.

    Private Sub LoginControl1_LoginSucceeded(ByVal sender As Object, ByVal args As sforce.Windows.Controls.LoginControl.LoginSucceededEventArgs) Handles LoginControl1.LoginSucceeded
        'get some property returned by the LoginControl
        Debug.WriteLine(LoginControl1.SessionId)

        'Get the webReference (proxy client) instance for future reference
        webRef = LoginControl1.sfHelper.webReference

        'Use the helper class from the CommonClassLibrary
        Dim SFHelper As sfHelper = LoginControl1.sfHelper

        'Execute a simple query using the helper class
        Dim queryResult As Object = SFHelper.QueryFilter("contact", -1, New String() {"id", "firstName", "lastName"}, Nothing, True)

        'Convert the results to a datatable
        Dim dataTable As DataTable = SFHelper.GetDataTable(queryResult)

        'Bind the data table to display in a grid control
        DataGrid1.DataSource = dataTable
    End Sub
End Class

Public Module global
    Public webRef As sforce.CommonClassLibrary.sForce.sfconnector = Nothing
End Module