• benfaust
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 27
    Replies
We're running into a problem (during a very large presentation) in which we cannot login as any of the users via the API. It returns an error about "Invalid object type 'Organization'". We haven't had this problem before, and I think it's probably related to their user permissions (of which I know little).
 
What user settings determine whether a user's account can be accessed via the API?
After spending several hours running in one big circle, I was asked to post a thread here asking what happened at Salesforce yesterday (07/26/2006).
 
Here's the scenario:
 
Yesterday we logged into our system through Salesforce and received an error. Prior to this, there were no errors nor had there been for a very long time. We changed nothing connected to this part of our system.
 
Someone from Salesforce very quickly jumped in to help, which we greatly appreciate. Later that evening we had the latest, previously unreleased PHP toolkit in place. However, the original error was still there.
 
This morning I logged into our system through Salesforce, and the error was mysteriously gone. However, upon testing another part of our system, we were receiving a different error. I reverted to the version of the Salesforce toolkit we were using previously, and the new error disappeared. Strangely, yesterday's error did not reappear.
 
Our code, in the context of these two parts of our system, is now identical to what it was the day before yesterday. There are now no errors.
 
We were assured nothing changed in the Salesforce system. However, I would think myself intellectually dishonest if I accepted that both nothing was changed on the SF side, and also there were no system issues on the SF side, since today we are error-free using the exact same code we were using both the day before yesterday when we were error free, and also yesterday when we received an error.
 
And so, once again, the question I was instructed to ask by posting the details of this issue is, what happened over there at Salesforce?
Yesterday evening, connecting via PHP 5.1 was working properly as it has been for some time now. This morning, we're receiving a fatal error. Nothing has changed in our code overnight, and I was wondering if something has changed on the Salesforce side concerning connection.
 
Here's the error:
 
Fatal error: Uncaught SoapFault exception: [soapenv:Client] Element {)item invalid at this location in /path-to/SforceBaseClient.php:79 Stack trace: #0 [internal function]: SoapClient->__call('login', Array) #1 /path-to/SforceBaseClient.php(79): SoapClient->login(Array) #2 /another-path-to/connect.php(13): SforceBaseClient->login('my username is here', 'my password is here') #3 /another-path-to/index.php(228): include_once('/some-path/h...') #4 {main} thrown in /path-to/SforceBaseClient.php on line 79
I posted this question already, but after over a week no one has replied, so I'll rephrase it here. Surely we're not the only ones who have encountered this issue, and it's stalling any further progress.
 
We've been successfully retrieving a list of Lead and Contact results using PHP. We're querying the fields LastName, FirstName, Title, Street, City, State, PostalCode, Country, Phone, Email, and Id.
 
When we add ANY other field, whether it's a standard field such as Fax or Description, or a custom field, the contents of the [any] part of the object changes from a value to an array containing two items.
 
Before Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => BenFaustna /naVT12345ben@eem.tv89723472
                )
...
 
After Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => Array
                        (
                            [0] => BenFaustna /naVT12345ben@eem.tv89723472
                            [1] =>
                        )
                )
...
We've been successfully retrieving a list of Lead and Contact results using php 5.1. We're querying the fields LastName, FirstName, Title, Street, City, State, PostalCode, Country, Phone, Email, and Id. When we add ANY other field, whether it's a standard field such as Fax or Description, or a custom field, the contents of the [any] part of the object changes from a value to an array containing two items.
 
Anyone have similar issues? This is a rush job and is turning into a time nightmare.
 
Before Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => BenFaustna /naVT12345ben@eem.tv89723472
                )
...
 
After Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => Array
                        (
                            [0] => BenFaustna /naVT12345ben@eem.tv89723472
                            [1] =>
                        )
                )
...

Message Edited by benfaust on 07-24-2006 11:35 AM

Is there any way to create a lead/contact history via the API? We want to make a history entry every time our system creates or updates a record. We're using PHP 4.x.

After using the below code to connect pro users via the already-working API connection we've installed in our system, the following error is returned: [sf:API_DISABLED_FOR_ORG] API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner

It has been verified that our userid/password (replaced below with "username/password") is indeed correct and allows login (with sligh variation to capitalization of password, which will not be repeated here) via the sforce explorer. However, it returns the above code when called using the below code.

After several weeks of attempting to successfully integrate with Salesforce, we need to get this resolved yesterday.

include_once('SforcePartnerClient.php');
$client2=new SforcePartnerClient();
$client=$client2->createConnection("partner.wsdl.xml");
 
$client2->setClientID('username/password');
$result = $client2->login($login[0],$login[1]);
 
// note that $login[0] holds the individual's Salesforce username and $login[1] holds their password. All this code works for upserting, but only if the user is Enterprise. For Pro users, the previously-mentioned error is returned.
 
We need to include a certified Client ID using PHP. I noticed another thread saying this is not in the API documentation. Someone provided us with the following Java and C code, but could not provide any PHP examples. Anyone know how to do this with PHP?
 
// Use the following in your login method,
// before you make your login call to the service.
// set the call option for client id

Java Example:
String clientID =
"your_clientid_is_case_sensitive";
CallOptions co = new CallOptions();
co.setClient(clientID);

// bind it to the current soap session
binding.setHeader("SforceService", "CallOptions", co);

C# Example:
String clientID = "your_clientid_is_case_sensitive";
CallOptions co = new CallOptions();
co.client = clientID;

binding.CallOptionsValue = co;
Hello,
 
We're using the following bit of code (not exhaustively provided here) to upsert a Lead. The resulting error states the external ID does not exist. We have created a custom field for Leads called "emailid" in the account to which this code is attempting to upsert the Lead. Any ideas why this is not working?
 

$sObject = new SObject();

$sObject->fields=$FIELDS;

$sObject->type=$data["salesforce_type"];

$sObject->emailid=$data["email"];

$sfresults=$client2->upsert('emailid',array($sObject));

 

Perhaps something as simple as a working example using real strings (vs variables) would provide all the  direction we need to get this working.

 

Thanks,

-Ben

We're running into a problem (during a very large presentation) in which we cannot login as any of the users via the API. It returns an error about "Invalid object type 'Organization'". We haven't had this problem before, and I think it's probably related to their user permissions (of which I know little).
 
What user settings determine whether a user's account can be accessed via the API?
Yesterday evening, connecting via PHP 5.1 was working properly as it has been for some time now. This morning, we're receiving a fatal error. Nothing has changed in our code overnight, and I was wondering if something has changed on the Salesforce side concerning connection.
 
Here's the error:
 
Fatal error: Uncaught SoapFault exception: [soapenv:Client] Element {)item invalid at this location in /path-to/SforceBaseClient.php:79 Stack trace: #0 [internal function]: SoapClient->__call('login', Array) #1 /path-to/SforceBaseClient.php(79): SoapClient->login(Array) #2 /another-path-to/connect.php(13): SforceBaseClient->login('my username is here', 'my password is here') #3 /another-path-to/index.php(228): include_once('/some-path/h...') #4 {main} thrown in /path-to/SforceBaseClient.php on line 79
I posted this question already, but after over a week no one has replied, so I'll rephrase it here. Surely we're not the only ones who have encountered this issue, and it's stalling any further progress.
 
We've been successfully retrieving a list of Lead and Contact results using PHP. We're querying the fields LastName, FirstName, Title, Street, City, State, PostalCode, Country, Phone, Email, and Id.
 
When we add ANY other field, whether it's a standard field such as Fax or Description, or a custom field, the contents of the [any] part of the object changes from a value to an array containing two items.
 
Before Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => BenFaustna /naVT12345ben@eem.tv89723472
                )
...
 
After Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => Array
                        (
                            [0] => BenFaustna /naVT12345ben@eem.tv89723472
                            [1] =>
                        )
                )
...
We've been successfully retrieving a list of Lead and Contact results using php 5.1. We're querying the fields LastName, FirstName, Title, Street, City, State, PostalCode, Country, Phone, Email, and Id. When we add ANY other field, whether it's a standard field such as Fax or Description, or a custom field, the contents of the [any] part of the object changes from a value to an array containing two items.
 
Anyone have similar issues? This is a rush job and is turning into a time nightmare.
 
Before Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => BenFaustna /naVT12345ben@eem.tv89723472
                )
...
 
After Any Additional Field:
stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [type] => Lead
                    [Id] => Array
                        (
                            [0] => 00Q3000000BK8qbEAD
                            [1] => 00Q3000000BK8qbEAD
                        )
                    [any] => Array
                        (
                            [0] => BenFaustna /naVT12345ben@eem.tv89723472
                            [1] =>
                        )
                )
...

Message Edited by benfaust on 07-24-2006 11:35 AM

Is there any way to create a lead/contact history via the API? We want to make a history entry every time our system creates or updates a record. We're using PHP 4.x.

After using the below code to connect pro users via the already-working API connection we've installed in our system, the following error is returned: [sf:API_DISABLED_FOR_ORG] API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner

It has been verified that our userid/password (replaced below with "username/password") is indeed correct and allows login (with sligh variation to capitalization of password, which will not be repeated here) via the sforce explorer. However, it returns the above code when called using the below code.

After several weeks of attempting to successfully integrate with Salesforce, we need to get this resolved yesterday.

include_once('SforcePartnerClient.php');
$client2=new SforcePartnerClient();
$client=$client2->createConnection("partner.wsdl.xml");
 
$client2->setClientID('username/password');
$result = $client2->login($login[0],$login[1]);
 
// note that $login[0] holds the individual's Salesforce username and $login[1] holds their password. All this code works for upserting, but only if the user is Enterprise. For Pro users, the previously-mentioned error is returned.