• BobH
  • NEWBIE
  • 0 Points
  • Member since 2005

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

Hi all,

I'm new to SalesForce.  I have been messing around with the API the last few days.  I have managed to write code to insert a new contact and account.  I also played around with querying data in accounts.  But I am stumped on something.  We have created several user-defined fields in accounts.  By reading thru various posts I see that you must append __C at the end of custom fields.  So here is my SQL statement:

 

qra = binding.query("select Name, Site, Id, Bed_Count__c from Account")  Bed_Count is the user defined field.  I would like to display this field.  How do I do this?

 

Thanks,

Bob

  • January 14, 2005
  • Like
  • 0

Hi all,

This is my first post here.  I am also brand new to SalesForce.  I just started messing with the SalesForce web services.  I can login and run some simple queries with no problems.  Now, I want to insert a new contact into my salesforce database.  I am using vb.net.  Here is my code:

 

Private Sub InsertNewContact()

Try

If Not login() Then

Return

End If

Dim cons(1) As sforce.sObject

Dim contact As New sforce.Contact

Dim j As Integer

For j = 0 To cons.GetUpperBound(0)

Next

If Not accounts Is Nothing Then

contact.AccountId = accounts(0)

End If

contact.AssistantName = "Jane"

contact.AssistantPhone = "777.777.7777"

contact.Department = "IT"

contact.Description = "Software Developer"

contact.Email = "bh0526@netzero.com"

contact.Fax = "555.555.5555"

contact.MailingCity = "Boca Raton"

contact.MailingCountry = "US"

contact.MailingState = "FL"

contact.MailingStreet = "1907 NE 2nd St"

contact.MailingPostalCode = "33441"

contact.MobilePhone = "888.888.8888"

contact.FirstName = "Bob"

contact.LastName = "Herrmann"

contact.Salutation = "Mr."

contact.Phone = "999.999.9999"

contact.Title = "Software Developer"

cons(1) = contact

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

Catch Ex As Exception

Response.Write(Ex.Message)

End Try

End Sub

I never get an error.  But if I go into salesforce.com I do not see this new contact.  Can anyone tell me what I'm doing wrong?

 

Thanks,

Bob

  • January 13, 2005
  • Like
  • 0

Hi all,

I'm new to SalesForce.  I have been messing around with the API the last few days.  I have managed to write code to insert a new contact and account.  I also played around with querying data in accounts.  But I am stumped on something.  We have created several user-defined fields in accounts.  By reading thru various posts I see that you must append __C at the end of custom fields.  So here is my SQL statement:

 

qra = binding.query("select Name, Site, Id, Bed_Count__c from Account")  Bed_Count is the user defined field.  I would like to display this field.  How do I do this?

 

Thanks,

Bob

  • January 14, 2005
  • Like
  • 0

Hi all,

This is my first post here.  I am also brand new to SalesForce.  I just started messing with the SalesForce web services.  I can login and run some simple queries with no problems.  Now, I want to insert a new contact into my salesforce database.  I am using vb.net.  Here is my code:

 

Private Sub InsertNewContact()

Try

If Not login() Then

Return

End If

Dim cons(1) As sforce.sObject

Dim contact As New sforce.Contact

Dim j As Integer

For j = 0 To cons.GetUpperBound(0)

Next

If Not accounts Is Nothing Then

contact.AccountId = accounts(0)

End If

contact.AssistantName = "Jane"

contact.AssistantPhone = "777.777.7777"

contact.Department = "IT"

contact.Description = "Software Developer"

contact.Email = "bh0526@netzero.com"

contact.Fax = "555.555.5555"

contact.MailingCity = "Boca Raton"

contact.MailingCountry = "US"

contact.MailingState = "FL"

contact.MailingStreet = "1907 NE 2nd St"

contact.MailingPostalCode = "33441"

contact.MobilePhone = "888.888.8888"

contact.FirstName = "Bob"

contact.LastName = "Herrmann"

contact.Salutation = "Mr."

contact.Phone = "999.999.9999"

contact.Title = "Software Developer"

cons(1) = contact

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

Catch Ex As Exception

Response.Write(Ex.Message)

End Try

End Sub

I never get an error.  But if I go into salesforce.com I do not see this new contact.  Can anyone tell me what I'm doing wrong?

 

Thanks,

Bob

  • January 13, 2005
  • Like
  • 0