function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
unikevinunikevin 

how to access SelfServiceUser object via PHP toolkits?

 
I try to query like "select Id,IsActive,LocaleSidKey from SelfServiceUser",and catch a Exception:" INVALID_TYPE: sObject type 'SelfServiceUser' is not supported" , is there any other way I can access the SelfServiceUser object ?
 
thanks!
ViewPlusViewPlus
Using the PHP API I had no problems retrieving the data you are looking for.

The big question is how can you use an external app check the credentials of the SelfServiceUser? The password field seems to be unavailable. Is there a login method that can be used to verify the username/password pair?


Code:
 $res = $sfa->query("SELECT Id,IsActive,LocaleSidKey from SelfServiceUser");
 
 if ($res->records[0]) {  
  $user = new SObject($res->records[0]);   
 }
 print_r($user);

 

Message Edited by ViewPlus on 12-13-2006 09:13 AM

SuperfellSuperfell
Right now, you need to screen scrape the portal login page to do this, with the Winter '07 release, you'll be able to do this via the regular API login call (in conjunction with the loginScope header).
unikevinunikevin

hi all,

I find it's the problem of login mode. If I use username and password to login to SFDC via API, there is no problem, and if I use session to login , many problems are going to happen... like I can't update custom objects or access some objects..

code:

$this->mySforceConnection = new SforcePartnerClient();
$sforceSoapClient = $this->mySforceConnection->createConnection($this->wsdl);
$this->mySforceConnection->setEndpoint($session[2]);
$this->mySforceConnection->setSessionHeader($session[1]);

// $session is from the first time login SFDC using username and password...

Is this the problem? 

thanks!