• Rich.ax131
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 29
    Replies
I'm using the SOAP technique to read Sales Force data into a disconnected ADO recordset via "classic" ASP.  I'm having a problem any time apostrophes appear in the Sales Force source data.  If I view a problem record containing an apostrophe in a record in the Sales Force explorer it appears as some strange rectangle.  If I copy and paste that character into my code in an attempt to execute a "replace" I get errors in my development environment about converting the page to unicode.
 
Any ideas?  I'm sure I'm not the first person to have this problem but I haven't been able to find a resolution.
 
Thanks in advance.
 
Rich
I'm sure there is a good answer for this question but I have not been able to find it myself yet . . .

I would like to query the billing postal code field on the Account object. In the sForce Explorer tool it appears that this field is exposed via the API. I also see this field specified in my WSDL:



However, when I try to write code to pull it I get errors about BillingPostalCode not being an Account object property. If I go into Sales Force setup and look at the Account fields list, I see a "Billing Address" field with type "Address." I guess I'm confused.

Any pearls of wisdom?

Thanks,
Rich

Message Edited by Rich on 01-30-2006 09:24 AM

My company has a potential sControl need. I have poked around these boards and the sControl documentation to see if what I need is possible but can't quite piece it all together. I was hoping someone here might be able to tell me if this is even possible, and if so point me in the right direction for accomplishing implementation.

We have a custom table containing cross-reference information for the zip code entered for a lead. For example, if the zip code entered is 'XXXXX,' this table would be referenced to obtain the associated city, state, country, county, and sales manager (or lead owner) for that zip code. Ideally, the following process would take place in Sales Force:

1. A user enters or edits the zip code for a lead.
2. An event fires on exit of the zip code form field which triggers the sControl to retrieve information from the custom zip code table.
3. The retrieved information is placed in the appropriate lead form fields.
4. If no cross-referencing data is found for the entered zip code, a JavaScript alert is fired to notify the user.

I can accomplish this fairly easily by building a completely custom HTML form and AJAX, but I was hoping (and users as well) that it could all be done in Sales Force.

Thoughts?

Thanks in advance.

Rich
I'm trying to automate task creation, but I'm getting an error message indicating that the AccountId field is not updateable. If I don't set a value for AccountId the task appears to be created without error, but I can't find it anywhere. Without the AccountId association I'm not sure what the "tie" is between the task and anythng else.

Any suggestions?

Thanks,
Rich

Sorry for wasting anyone's time with a basic question, but I've seen references to "web-to-lead" several times on this board.  I've searched the downloadable sample code and not located this specifically.  Is this a specific tool or utility, or just a generic application of the API?  If the former, can someone please point me to some sample code demonstrating its use?

I would like to integrate the web-to-lead functionality into a classic ASP (not .NET) application, if possible.  I have some old ASP code that is using the SOAP toolkit, but it's no longer working for some reason.

Thanks in advance.

I'm trying to make a SOAP Login function call in VB6 using v4 of the API.  This same technique worked fine with v1 of the API, but the code below produces a "Premature end of file" error message.  I can't find any documentation on that particular error.  Any suggestions?

Dim objHTTP As New MSXML2.XMLHTTP
    Dim strUsername As String
    Dim strPassword As String
    Dim sforceSoapServer As String
    Dim strSoapBody As String
    Dim strResponse As String
   
    strUsername = [username]
    strPassword = [password]
    sforceSoapServer = "https://na1-api.salesforce.com/servlet/servlet.SoapApi"
   
    strSoapBody = strSoapBody & ""
    strSoapBody = strSoapBody & "   http://schemas.xmlsoap.org/soap/envelope/"""
    strSoapBody = strSoapBody & "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://"
    strSoapBody = strSoapBody & "www.w3.org/2001/XMLSchema"">"
    strSoapBody = strSoapBody & "      "
    strSoapBody = strSoapBody & "         "
    strSoapBody = strSoapBody & "            " & strUsername & ""
    strSoapBody = strSoapBody & "            " & strPassword & ""
    strSoapBody = strSoapBody & "         "
    strSoapBody = strSoapBody & "      "
    strSoapBody = strSoapBody & "   "
       
    'Build the SOAP header
    Set XMLHTTP = CreateObject("Msxml2.ServerXMLHTTP")
    XMLHTTP.Open "POST", sforceSoapServer, False   'False = do not respond immediately
    XMLHTTP.setRequestHeader "Man", POST & " " & sforceSoapServer & " HTTP/1.1"
    XMLHTTP.setRequestHeader "Content-Type", "text/xml"
       
    'Send the SOAP request
    XMLHTTP.send (strSoapRequest)
    strResponse = XMLHTTP.responseText
    Debug.Print strResponse
    Set XMLHTTP = Nothing

Not .NET, but  . . .

I'm attempting to use the SOAP Login method from the documentation using classic ASP.  This same techniqe worked with v1 of the API, but when I execute the following code all I get returned from strResponse is "Premature end of file."  I can't find any documentation regarding exactly what that error means.  Any pearls of wisdom?

strUsername = [username]
strPassword = [password]
sforceSoapServer = "https://na1-api.salesforce.com/servlet/servlet.SoapApi"

strSoapBody = strSoapBody & ""
strSoapBody = strSoapBody & "   http://schemas.xmlsoap.org/soap/envelope/"""
strSoapBody = strSoapBody & "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://"
strSoapBody = strSoapBody & "www.w3.org/2001/XMLSchema"">"
strSoapBody = strSoapBody & "      "
strSoapBody = strSoapBody & "         "
strSoapBody = strSoapBody & "            " & strUsername & ""
strSoapBody = strSoapBody & "            " & strPassword & ""
strSoapBody = strSoapBody & "         "
strSoapBody = strSoapBody & "      "
strSoapBody = strSoapBody & "   "
   
'Build the SOAP header
Set XMLHTTP = CreateObject("Msxml2.ServerXMLHTTP")
XMLHTTP.open "POST", sforceSoapServer, False   'False = do not respond immediately
XMLHTTP.setRequestHeader "Man", POST & " " & sforceSoapServer & " HTTP/1.1"
XMLHTTP.setRequestHeader "Content-Type", "text/xml"
   
'Send the SOAP request
XMLHTTP.send (strSoapRequest)
strResponse = XMLHTTP.responseText
response.Write strResponse

I'm just now digging into the 4.0 API samples (nice job, by the way).  I'm trying to query a custom table using the following code:

qr =binding.query("select City__c from Masters_Of_Iron__c");

I'm getting a "Specified cast is not valid" error message.  The actual field name according to SalesForce is "City" but when I do a describe on the Masters_Of_Iron table I see that the name property is "City__c" so that's how I assume I am to reference it. 

I see some similar posts on this board but nothing has resolve my error.  I've tried various combinations of case on the field reference.

Any suggestions?  Thanks in advance.

 

I'm using the SOAP technique to read Sales Force data into a disconnected ADO recordset via "classic" ASP.  I'm having a problem any time apostrophes appear in the Sales Force source data.  If I view a problem record containing an apostrophe in a record in the Sales Force explorer it appears as some strange rectangle.  If I copy and paste that character into my code in an attempt to execute a "replace" I get errors in my development environment about converting the page to unicode.
 
Any ideas?  I'm sure I'm not the first person to have this problem but I haven't been able to find a resolution.
 
Thanks in advance.
 
Rich
I'm sure there is a good answer for this question but I have not been able to find it myself yet . . .

I would like to query the billing postal code field on the Account object. In the sForce Explorer tool it appears that this field is exposed via the API. I also see this field specified in my WSDL:



However, when I try to write code to pull it I get errors about BillingPostalCode not being an Account object property. If I go into Sales Force setup and look at the Account fields list, I see a "Billing Address" field with type "Address." I guess I'm confused.

Any pearls of wisdom?

Thanks,
Rich

Message Edited by Rich on 01-30-2006 09:24 AM

My company has a potential sControl need. I have poked around these boards and the sControl documentation to see if what I need is possible but can't quite piece it all together. I was hoping someone here might be able to tell me if this is even possible, and if so point me in the right direction for accomplishing implementation.

We have a custom table containing cross-reference information for the zip code entered for a lead. For example, if the zip code entered is 'XXXXX,' this table would be referenced to obtain the associated city, state, country, county, and sales manager (or lead owner) for that zip code. Ideally, the following process would take place in Sales Force:

1. A user enters or edits the zip code for a lead.
2. An event fires on exit of the zip code form field which triggers the sControl to retrieve information from the custom zip code table.
3. The retrieved information is placed in the appropriate lead form fields.
4. If no cross-referencing data is found for the entered zip code, a JavaScript alert is fired to notify the user.

I can accomplish this fairly easily by building a completely custom HTML form and AJAX, but I was hoping (and users as well) that it could all be done in Sales Force.

Thoughts?

Thanks in advance.

Rich
I'm trying to automate task creation, but I'm getting an error message indicating that the AccountId field is not updateable. If I don't set a value for AccountId the task appears to be created without error, but I can't find it anywhere. Without the AccountId association I'm not sure what the "tie" is between the task and anythng else.

Any suggestions?

Thanks,
Rich

Sorry for wasting anyone's time with a basic question, but I've seen references to "web-to-lead" several times on this board.  I've searched the downloadable sample code and not located this specifically.  Is this a specific tool or utility, or just a generic application of the API?  If the former, can someone please point me to some sample code demonstrating its use?

I would like to integrate the web-to-lead functionality into a classic ASP (not .NET) application, if possible.  I have some old ASP code that is using the SOAP toolkit, but it's no longer working for some reason.

Thanks in advance.

I'm trying to make a SOAP Login function call in VB6 using v4 of the API.  This same technique worked fine with v1 of the API, but the code below produces a "Premature end of file" error message.  I can't find any documentation on that particular error.  Any suggestions?

Dim objHTTP As New MSXML2.XMLHTTP
    Dim strUsername As String
    Dim strPassword As String
    Dim sforceSoapServer As String
    Dim strSoapBody As String
    Dim strResponse As String
   
    strUsername = [username]
    strPassword = [password]
    sforceSoapServer = "https://na1-api.salesforce.com/servlet/servlet.SoapApi"
   
    strSoapBody = strSoapBody & ""
    strSoapBody = strSoapBody & "   http://schemas.xmlsoap.org/soap/envelope/"""
    strSoapBody = strSoapBody & "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://"
    strSoapBody = strSoapBody & "www.w3.org/2001/XMLSchema"">"
    strSoapBody = strSoapBody & "      "
    strSoapBody = strSoapBody & "         "
    strSoapBody = strSoapBody & "            " & strUsername & ""
    strSoapBody = strSoapBody & "            " & strPassword & ""
    strSoapBody = strSoapBody & "         "
    strSoapBody = strSoapBody & "      "
    strSoapBody = strSoapBody & "   "
       
    'Build the SOAP header
    Set XMLHTTP = CreateObject("Msxml2.ServerXMLHTTP")
    XMLHTTP.Open "POST", sforceSoapServer, False   'False = do not respond immediately
    XMLHTTP.setRequestHeader "Man", POST & " " & sforceSoapServer & " HTTP/1.1"
    XMLHTTP.setRequestHeader "Content-Type", "text/xml"
       
    'Send the SOAP request
    XMLHTTP.send (strSoapRequest)
    strResponse = XMLHTTP.responseText
    Debug.Print strResponse
    Set XMLHTTP = Nothing