• Ahlomon
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 22
    Replies

I build the web service with Delegated Authentication WSDL as reference in my web service and now when I enter my Id and Password manually it works and I am getting “True”

My question is how I can get Id and Password programmatically from windows:

 
 Dim x As New localhost.Service 

        Response.Write(x.Authenticate("id", "password", "1.1.1.1"))

 

Can I programmatically give the sharing to the specific account in S-Control?

 

Thanks in advance.

A have the user Mike Smith who assigned to Region 3 Profile, how I can programmaticly assign Mike Smith to see only all Accounts B in all profiles? Please help me to make right steps for this security model.

Region 1 (Profile)    Region 2 (Profile)   Region 3 (Profile)   Region 4 (Profile)

Account A, MA          Account A, RI       Account A, WY        Account A, GA
Account B, CT          Account B, PA       Account B, MI        Account B, FL
Account C, NY          Account C, CA       Account C, NH        Account C, WA
 
If the field (below in red) is greater than '999', for example '1,357' then returns error. The field defined as number (8,0) in the object.
If the field is less than 1,000 then it works.
 
Please help me to understand this problem.
==============================================================
 
var o = new sforce.SObject('IS_Machine_Make_Model__c');
          o.set('Machine_Make__c', mach_make);
          o.set('Machine_Model__c', mach_model);
          o.set('Feet__c', blade_feet);
          o.set('Inches__c', blade_inches);
          o.set('Name', is_make_model);
          o.set('Blade_Width_Common__c', blade_width);
          o.set('Blade_Gauge__c', blade_gauge);
          o.set('Orientation__c', orientation);
          o.set('Feed_System__c', feed_system);
          o.set('Blade_Length_mm__c', blade_length_mm);
          o.set('Blade_Gauge_mm__c', blade_gauge_mm);
          o.set('Blade_Width_mm__c', blade_width_mm);
          var results = sforce.connection.create([o]);
          var locationString = '/' + results[0].id + '/e';
          locationString += '?retURL=%2F' + results[0].id;
Would you please tell me what I am doing wrong here? I am getting the data but the data is wrong (in red)
 
=============================================================================

queryString = "Select Id,Name,CreatedDate,CreatedById,Status__c,Service_Date__c,Hr__c from IS_TSR__c"

Dim done As Boolean = False

Try

qr = binding.query(queryString)

If qr.size > 0 Then

While Not done

'**********************************************

For i = 0 To qr.records.Length - 1

Dim tsr_data As sforce.IS_TSR__c

tsr_data = qr.records(i)

 

TSR_ID_arr.Add(tsr_data.Id)

TSR_NAME_arr.Add(tsr_data.Name)

TSR_CREATION_DATE_arr.Add(tsr_data.CreatedDate)

TSR_CREATED_BY_ID_arr.Add(tsr_data.CreatedById)

TSR_STATUS_arr.Add(tsr_data.Status__c)

TSR_RUN_DATE_arr.Add(tsr_data.Service_Date__c)

TSR_TIME_SPENT_arr.Add(tsr_data.Hr__c)

'*******************************************************************************************************

objWriter.WriteLine(TSR_ID_arr.Item(i).ToString & "|" & TSR_NAME_arr.Item(i).ToString & "|" & _

TSR_CREATION_DATE_arr.Item(i).ToString & "|" & TSR_CREATED_BY_ID_arr.Item(i).ToString & "|" & _

TSR_STATUS_arr.Item(i).ToString & "|" & TSR_RUN_DATE_arr.Item(i) & "|" & _

TSR_TIME_SPENT_arr.Item(i) & "|" & entryDt)

'*******************************************************************************************************

Next

If qr.done Then

done = True

Else

qr = binding.queryMore(qr.queryLocator)

End If

End While

I know my SQL should return about 3500 rows back, but the code below returns only 2000 rows back.
What I have to do to get all 3500 rows back?
 
 
================================================================
Private Function GetTSR() As Boolean
        Dim qr As sforce.QueryResult
        Dim queryString As String
      
        queryString = "Select Id,Name,CreatedDate,CreatedById,Status__c,Service_Date__c,Hr__c from IS_TSR__c"
        Try
            qr = binding.query(queryString)
            If Not qr.records Is Nothing Then
                Dim i As Integer
                For i = 0 To qr.records.Length - 1
                    Dim tsr_data As sforce.IS_TSR__c
                    tsr_data = qr.records(i)

                    TSR_ID_arr.Add(tsr_data.Id.ToString)
                    TSR_NAME_arr.Add(tsr_data.Name.ToString)
                    TSR_CREATION_DATE_arr.Add(tsr_data.CreatedDate.ToString)
                    TSR_CREATED_BY_ID_arr.Add(tsr_data.CreatedById.ToString)
                    TSR_STATUS_arr.Add(tsr_data.Status__c.ToString)
                    TSR_RUN_DATE_arr.Add(tsr_data.Service_Date__c.ToString)
                    TSR_TIME_SPENT_arr.Add(tsr_data.Hr__c.ToString)
                    '*******************************************************************************************************
                    Console.WriteLine(TSR_ID_arr.Item(i).ToString & "|" & TSR_NAME_arr.Item(i).ToString & "|" & _
                                      TSR_CREATION_DATE_arr.Item(i).ToString & "|" & TSR_CREATED_BY_ID_arr.Item(i).ToString & "|" & _
                                      TSR_STATUS_arr.Item(i).ToString & "|" & TSR_RUN_DATE_arr.Item(i).ToString & "|" & _
                                      TSR_TIME_SPENT_arr.Item(i).ToString & "|" & entryDt)
                    '*******************************************************************************************************
                Next
                GetTSR = True
                Console.WriteLine("Finished ==> GetTSRData")
            Else
                GetTSR = False
            End If
            Return GetTSR
        Catch ex As Exception
            strMessage = strMessage & vbCrLf & ex.Message & vbCrLf & ex.StackTrace & "<BR>"
        Finally
        End Try
    End Function

I am getting error on red line "Object reference not set to an instance of an object" that doesn't makes sence for me. I know that the value is empty for gto_data.LB_Perf__c.ToString

Please help

=========================================================================

Private Function GetGTO() As Boolean

Dim qr As sforce.QueryResult

Dim queryString As String

queryString = "Select Id,Name,CreatedDate,CreatedById,Test_Type__c,Trl_Run_By__c,Dte_Run__c,Time_Spent_On_GTO__c, LB_Perf__c,Business_Status__c,Business_Status_Reason__c,Dte_Clsd__c,LB_PdNm__c from ISGTO__c"

Try

qr = binding.query(queryString)

If Not qr.records Is Nothing Then

Dim i As Integer

For i = 0 To qr.records.Length - 1

Dim gto_data As sforce.ISGTO__c

gto_data = qr.records(i)

GTO_ID_arr.Add(gto_data.Id.ToString)

GTO_NAME_arr.Add(gto_data.Name.ToString)

GTO_CREATION_DATE_arr.Add(gto_data.CreatedDate.ToString)

GTO_CREATED_BY_ID_arr.Add(gto_data.CreatedById.ToString)

TRIAL_TYPE_arr.Add(gto_data.Test_Type__c.ToString)

TRIAL_RUN_BY_arr.Add(gto_data.Trl_Run_By__c.ToString)

TRIAL_RUN_DATE_arr.Add(gto_data.Dte_Run__c.ToString)

TIME_SPENT_arr.Add(gto_data.Time_Spent_On_GTO__c.ToString)

BLADE_PERFORMANCE_arr.Add(gto_data.LB_Perf__c.ToString)

BUSINESS_STATUS_arr.Add(gto_data.Business_Status__c.ToString)

BUSINESS_STATUS_REASON_arr.Add(gto_data.Business_Status_Reason__c.ToString)

TRIAL_DATE_CLOSED_arr.Add(gto_data.Dte_Clsd__c.ToString)

TRIAL_BLADE_PRODUCT_arr.Add(gto_data.LB_PdNm__c.ToString)

Next

Else

GetGTO = False

End If

Return GetGTO

Catch ex As Exception

Console.WriteLine(ex.Message & ex.StackTrace)

Finally

End Try

End Function

Please help me with the formating double type:
 
===================================
 
_mlength=qrdr.records[i].Blade_Length_mm__c; ==>  returns 19.0
 
How can I get format it to display just ==> 19 ?
 
Thanks for your help
Please help me with the formating double type:
 
===================================
 
_mlength=qrdr.records[i].Blade_Length_mm__c; ==>  returns 19.0
 
How can I get format it to display just ==> 19 ?
 
Thanks for your help

I will really appreciate if you can show me or point me to some code sample how to extract only all your table names and table fields from sForce object using VB.NET after you will login into your SalesForce.com account.

Instead of getting the values for two columns (Id and CreatedDate) I am getting only 1 column called “length” with the numbers of the length.
What I am doing wrong here??
 
========================================================
 
 
Private Function GetData() As Boolean
        Cursor = Cursors.WaitCursor
 
        Dim qr As sForce.QueryResult
        Dim queryString As String
 
        Dim list As System.Collections.ArrayList = New System.Collections.ArrayList
        queryString = "select Id, CreatedDate from TH_Revenue_Totals__c"
 
        Try
            qr = binding.query(queryString)
            If Not qr.records Is Nothing Then
                Dim i As Integer
 
                For i = 0 To qr.records.Length - 1
                    Dim rs As sForce.TH_Revenue_Totals__c
                    rs = qr.records(i)
 
                    list.Add(rs.Id.ToString)
                    list.Add(rs.CreatedDate.ToString)
 
                Next
                DataGrid1.DataSource = list
                GetData = True
            Else
                GetData = False
            End If
 
            Return GetData
        Catch ex As Exception
            lblStatus.Text = ex.Message
        Finally
            Cursor = Cursors.Default
        End Try
    End Function
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Call GetData()
 
    End Sub

Instead of getting the values for two columns (Id and CreatedDate) I am getting only 1 column called “length” with the numbers of the length.

What I am doing wron here??

 

Private Function GetData() As Boolean

        Cursor = Cursors.WaitCursor

 

        Dim qr As sForce.QueryResult

        Dim queryString As String

 

        Dim list As System.Collections.ArrayList = New System.Collections.ArrayList

        queryString = "select Id, CreatedDate from TH_Revenue_Totals__c"

 

        Try

            qr = binding.query(queryString)

            If Not qr.records Is Nothing Then

                Dim i As Integer

 

                For i = 0 To qr.records.Length - 1

                    Dim rs As sForce.TH_Revenue_Totals__c

                    rs = qr.records(i)

 

                    list.Add(rs.Id.ToString)

                    list.Add(rs.CreatedDate.ToString)

 

                Next

                DataGrid1.DataSource = list

                GetData = True

            Else

                GetData = False

            End If

 

            Return GetData

        Catch ex As Exception

            lblStatus.Text = ex.Message

        Finally

            Cursor = Cursors.Default

        End Try

    End Function

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Call GetData()

 

    End Sub

Please point me to where I can find and download the object to use as a reference in VB 6.0
How I can Validate the user against the Public Group??

Can I programmatically give the sharing to the specific account in S-Control?

 

Thanks in advance.

A have the user Mike Smith who assigned to Region 3 Profile, how I can programmaticly assign Mike Smith to see only all Accounts B in all profiles? Please help me to make right steps for this security model.

Region 1 (Profile)    Region 2 (Profile)   Region 3 (Profile)   Region 4 (Profile)

Account A, MA          Account A, RI       Account A, WY        Account A, GA
Account B, CT          Account B, PA       Account B, MI        Account B, FL
Account C, NY          Account C, CA       Account C, NH        Account C, WA
 
If the field (below in red) is greater than '999', for example '1,357' then returns error. The field defined as number (8,0) in the object.
If the field is less than 1,000 then it works.
 
Please help me to understand this problem.
==============================================================
 
var o = new sforce.SObject('IS_Machine_Make_Model__c');
          o.set('Machine_Make__c', mach_make);
          o.set('Machine_Model__c', mach_model);
          o.set('Feet__c', blade_feet);
          o.set('Inches__c', blade_inches);
          o.set('Name', is_make_model);
          o.set('Blade_Width_Common__c', blade_width);
          o.set('Blade_Gauge__c', blade_gauge);
          o.set('Orientation__c', orientation);
          o.set('Feed_System__c', feed_system);
          o.set('Blade_Length_mm__c', blade_length_mm);
          o.set('Blade_Gauge_mm__c', blade_gauge_mm);
          o.set('Blade_Width_mm__c', blade_width_mm);
          var results = sforce.connection.create([o]);
          var locationString = '/' + results[0].id + '/e';
          locationString += '?retURL=%2F' + results[0].id;
Would you please tell me what I am doing wrong here? I am getting the data but the data is wrong (in red)
 
=============================================================================

queryString = "Select Id,Name,CreatedDate,CreatedById,Status__c,Service_Date__c,Hr__c from IS_TSR__c"

Dim done As Boolean = False

Try

qr = binding.query(queryString)

If qr.size > 0 Then

While Not done

'**********************************************

For i = 0 To qr.records.Length - 1

Dim tsr_data As sforce.IS_TSR__c

tsr_data = qr.records(i)

 

TSR_ID_arr.Add(tsr_data.Id)

TSR_NAME_arr.Add(tsr_data.Name)

TSR_CREATION_DATE_arr.Add(tsr_data.CreatedDate)

TSR_CREATED_BY_ID_arr.Add(tsr_data.CreatedById)

TSR_STATUS_arr.Add(tsr_data.Status__c)

TSR_RUN_DATE_arr.Add(tsr_data.Service_Date__c)

TSR_TIME_SPENT_arr.Add(tsr_data.Hr__c)

'*******************************************************************************************************

objWriter.WriteLine(TSR_ID_arr.Item(i).ToString & "|" & TSR_NAME_arr.Item(i).ToString & "|" & _

TSR_CREATION_DATE_arr.Item(i).ToString & "|" & TSR_CREATED_BY_ID_arr.Item(i).ToString & "|" & _

TSR_STATUS_arr.Item(i).ToString & "|" & TSR_RUN_DATE_arr.Item(i) & "|" & _

TSR_TIME_SPENT_arr.Item(i) & "|" & entryDt)

'*******************************************************************************************************

Next

If qr.done Then

done = True

Else

qr = binding.queryMore(qr.queryLocator)

End If

End While

I am getting error on red line "Object reference not set to an instance of an object" that doesn't makes sence for me. I know that the value is empty for gto_data.LB_Perf__c.ToString

Please help

=========================================================================

Private Function GetGTO() As Boolean

Dim qr As sforce.QueryResult

Dim queryString As String

queryString = "Select Id,Name,CreatedDate,CreatedById,Test_Type__c,Trl_Run_By__c,Dte_Run__c,Time_Spent_On_GTO__c, LB_Perf__c,Business_Status__c,Business_Status_Reason__c,Dte_Clsd__c,LB_PdNm__c from ISGTO__c"

Try

qr = binding.query(queryString)

If Not qr.records Is Nothing Then

Dim i As Integer

For i = 0 To qr.records.Length - 1

Dim gto_data As sforce.ISGTO__c

gto_data = qr.records(i)

GTO_ID_arr.Add(gto_data.Id.ToString)

GTO_NAME_arr.Add(gto_data.Name.ToString)

GTO_CREATION_DATE_arr.Add(gto_data.CreatedDate.ToString)

GTO_CREATED_BY_ID_arr.Add(gto_data.CreatedById.ToString)

TRIAL_TYPE_arr.Add(gto_data.Test_Type__c.ToString)

TRIAL_RUN_BY_arr.Add(gto_data.Trl_Run_By__c.ToString)

TRIAL_RUN_DATE_arr.Add(gto_data.Dte_Run__c.ToString)

TIME_SPENT_arr.Add(gto_data.Time_Spent_On_GTO__c.ToString)

BLADE_PERFORMANCE_arr.Add(gto_data.LB_Perf__c.ToString)

BUSINESS_STATUS_arr.Add(gto_data.Business_Status__c.ToString)

BUSINESS_STATUS_REASON_arr.Add(gto_data.Business_Status_Reason__c.ToString)

TRIAL_DATE_CLOSED_arr.Add(gto_data.Dte_Clsd__c.ToString)

TRIAL_BLADE_PRODUCT_arr.Add(gto_data.LB_PdNm__c.ToString)

Next

Else

GetGTO = False

End If

Return GetGTO

Catch ex As Exception

Console.WriteLine(ex.Message & ex.StackTrace)

Finally

End Try

End Function

Please help me with the formating double type:
 
===================================
 
_mlength=qrdr.records[i].Blade_Length_mm__c; ==>  returns 19.0
 
How can I get format it to display just ==> 19 ?
 
Thanks for your help
Please help me with the formating double type:
 
===================================
 
_mlength=qrdr.records[i].Blade_Length_mm__c; ==>  returns 19.0
 
How can I get format it to display just ==> 19 ?
 
Thanks for your help

I will really appreciate if you can show me or point me to some code sample how to extract only all your table names and table fields from sForce object using VB.NET after you will login into your SalesForce.com account.

Instead of getting the values for two columns (Id and CreatedDate) I am getting only 1 column called “length” with the numbers of the length.

What I am doing wron here??

 

Private Function GetData() As Boolean

        Cursor = Cursors.WaitCursor

 

        Dim qr As sForce.QueryResult

        Dim queryString As String

 

        Dim list As System.Collections.ArrayList = New System.Collections.ArrayList

        queryString = "select Id, CreatedDate from TH_Revenue_Totals__c"

 

        Try

            qr = binding.query(queryString)

            If Not qr.records Is Nothing Then

                Dim i As Integer

 

                For i = 0 To qr.records.Length - 1

                    Dim rs As sForce.TH_Revenue_Totals__c

                    rs = qr.records(i)

 

                    list.Add(rs.Id.ToString)

                    list.Add(rs.CreatedDate.ToString)

 

                Next

                DataGrid1.DataSource = list

                GetData = True

            Else

                GetData = False

            End If

 

            Return GetData

        Catch ex As Exception

            lblStatus.Text = ex.Message

        Finally

            Cursor = Cursors.Default

        End Try

    End Function

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Call GetData()

 

    End Sub

Please point me to where I can find and download the object to use as a reference in VB 6.0