• needdevhelp
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies

First I login and that has no issues. Then I create an array of field values and here is how I'm creating the lead:

Code:

$lead = array(
    'FirstName' => $firstname,
    'LastName' => $lastname,
    'Title' => $title,
    'Email' => $email,
    'Street' => $street

);
try {
  $addLeadResult = $sfdc->create("lead", $lead);
  echo $addLeadResult;
} catch (Exception $e) {
  global $errors;
  $errors = $e->faultstring;
  echo "Error Creating Lead: " . $e->faultstring . "<br/>";
}


 When this runs the output from the "echo $addLeadResult;" is "Object id #9".  I had plenty of errors getting this far so I know what the error messages look like.  This to me looks like success, but the new lead doesn't show up in Salesforce. 

Can you see what I'm doing wrong?

I've finally managed to succesfully create a new lead programatically.
 
The result string shows this: "Object id #9"
it doesn't look like an error but the new lead doesn't show up in salesforce.
 
Am I missing a step?
 
I'm working with PHP5 and the Partner API.  I'm creating a lead through the API and so far it's working with the standard fields, but none of the custom fields work.  I thought I had read that I could use the custom fields by name but that didn't work so I used the ugly names "00234239847" and that gives me this error:
 
The content of elements must consist of well-formed character data or markup.
 
I read in another forum that this was taken care of, but it still seems to be a problem.
 
any help will be appreciated.
regards
I'm using ASP classic to connect to salesforce.
 
Here's the code:
set sfApi = Server.CreateObject("SForceOfficeToolkit3.SForceSession3.1")
 result = sfApi.login(username,password)
 response.write result & "<br/>"
 response.write "Error = " &  sfApi.errormessage & "<br/>"
 
Here's the output:
false
Unable to send request to server. The requested lookup key was not found in any active activation context.
 
I'm positive that the username/password is correct.  I found a post that suggested permissions issues with this error so I tried correcting that but with no result.
 
any ideas?
Hey,
 
I searched and found several threads on using the COM object "SForceOfficeToolkit.SForceSession" to access salesforce from ASP but when I try to create this object I get an error as if the COM were not installed.  I have installed the Office Toolkit but it makes no difference.  Do I have the COM name wrong?  do I need a different installation package? ( I installed SForce_Office_Toolkit_MSI and sforce_connect_616 )
 
Thanks
 

First I login and that has no issues. Then I create an array of field values and here is how I'm creating the lead:

Code:

$lead = array(
    'FirstName' => $firstname,
    'LastName' => $lastname,
    'Title' => $title,
    'Email' => $email,
    'Street' => $street

);
try {
  $addLeadResult = $sfdc->create("lead", $lead);
  echo $addLeadResult;
} catch (Exception $e) {
  global $errors;
  $errors = $e->faultstring;
  echo "Error Creating Lead: " . $e->faultstring . "<br/>";
}


 When this runs the output from the "echo $addLeadResult;" is "Object id #9".  I had plenty of errors getting this far so I know what the error messages look like.  This to me looks like success, but the new lead doesn't show up in Salesforce. 

Can you see what I'm doing wrong?

I've finally managed to succesfully create a new lead programatically.
 
The result string shows this: "Object id #9"
it doesn't look like an error but the new lead doesn't show up in salesforce.
 
Am I missing a step?
 
I'm working with PHP5 and the Partner API.  I'm creating a lead through the API and so far it's working with the standard fields, but none of the custom fields work.  I thought I had read that I could use the custom fields by name but that didn't work so I used the ugly names "00234239847" and that gives me this error:
 
The content of elements must consist of well-formed character data or markup.
 
I read in another forum that this was taken care of, but it still seems to be a problem.
 
any help will be appreciated.
regards
Hey,
 
I searched and found several threads on using the COM object "SForceOfficeToolkit.SForceSession" to access salesforce from ASP but when I try to create this object I get an error as if the COM were not installed.  I have installed the Office Toolkit but it makes no difference.  Do I have the COM name wrong?  do I need a different installation package? ( I installed SForce_Office_Toolkit_MSI and sforce_connect_616 )
 
Thanks
 
Is there a simple recipe to make web service calls in the classic ASP environment using MS SOAP Toolkit 3.0?

I tried the following:

dim oSOAP
set oSOAP = Server.CreateObject("MSSOAP.SoapClient")
oSOAP.ClientProperty("ServerHTTPRequest") = True
oSOAP.mssoapinit("C:\sforce.wsdl.xml")

where sforce.wsdl.xml is the WSDL file generate by sforce and saved on the local box running classic ASP and MS SOAP Tollkit 3.0.

I receive the following result:

Error Type:
Client (0x80020009)
WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005
- WSDLReader:Initialization of service failed HRESULT=0x80004005
- WSDLService:Initialization of the port for service SforceService failed HRESULT=0x80004005
- WSDLPort:Analyzing the binding information for port Soap failed HRESULT=0x80004005
- WSDLPort:An operation for port Soap could not be initialized HRESULT=0x80004005
- WSDLOperation:Initializing of the input message failed for operation delete HRESULT=0x80004005
- WSDLOperation:Initialization of a SoapMapper for operation delete failed HRESULT=0x80004005
- SoapMapper:The SoapMapper for element ids could not be created HRESULT=0x80004005

My goal is to use sforce webservices without .NET using ASP.

Thank you for any suggestions.

-Chris.
  • December 01, 2004
  • Like
  • 0

The following vbscript code fails at the MSSoapInit line with the following error.  any suggestions for using the MSSoap 3.0 library with the 2.5 API?

WSDLOperation: -2147352567
WSDLOperation:The operation login had an invalid parts attribute HRESULT=0x80004005: Unspecified error
 - WSDLOperation:Initializing of the input message failed for operation login HRESULT=0x80004005: Unspecified error
 - WSDLPort:An operation for port Soap could not be initialized HRESULT=0x80004005: Unspecified error
 - WSDLPort:Analyzing the binding information for port Soap failed HRESULT=0x80004005: Unspecified error
 - WSDLService:Initialization of the port for service SforceService failed HRESULT=0x80004005: Unspecified error
 - WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005: Unspecified error
 - Clientne of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.

 

Sub Main
 Dim client As New MSSOAPLib30.SoapClient30

 Dim wsdl As String

 wsdl = MacroDir & "\enterprise.wsdl"

 On Error GoTo HandleError

 client.MSSoapInit(wsdl, "SforceService", "Soap")

...

end Sub