• Nadula
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
You can use this function to retrieve list view data from Salesforce via SOAP API.

Since this function is new, I couldn't find any useful resources on the internet. And PHP Toolkit 20.0 does not work with this new function.
Hence here goes my attempt and it works.

Sample code:
$ListViewOrderBy = new stdclass();	
$ListViewOrderBy->fieldNameOrPath = "Id";
$ListViewOrderBy->nullsPosition = "first";
$ListViewOrderBy->sortDirection = "ascending";		

$ExecuteListViewRequest = new stdclass();
$ExecuteListViewRequest->request = new stdclass();
$ExecuteListViewRequest->request->developerNameOrId = "Your ListViewID";	
$ExecuteListViewRequest->request->limit = 5000;	
//$ExecuteListViewRequest->request->offset = 0;		
$ExecuteListViewRequest->request->orderBy = $ListViewOrderBy;				
$ExecuteListViewRequest->request->sobjectType = "Lead";	
	
$response = $sfConnection->executeListView($ExecuteListViewRequest);
And access data using following:
foreach($response->result->records as $record) { }

This is how I manage to run this API call without uisng PHP Toolkit 20.0
 
$sfConnection = new SoapClient($wsdl_path);

//Login
$loginResult = $sfConnection->login(array (
	'username' => $USERNAME,
	'password' => $PASSWORD
));				
$sessionHeader = new SoapHeader("urn:enterprise.soap.sforce.com", "SessionHeader", array('sessionId' => $loginResult->result->sessionId));
$sfConnection->__setSoapHeaders($sessionHeader);
$sfConnection->sessionId = $loginResult->result->sessionId;		
$serverURL = $loginResult->result->serverUrl;		
$sfConnection->location = $serverURL;

Hope this helps someone.


Cheers
Nadula
  • November 12, 2014
  • Like
  • 1
Hi Guys,

Need some help here,

I want to retrieve all the field data of a particular object.

I see standard retrieve core call (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_retrieve.htm" target="_blank) has three arguments (fieldList, sObjectType, ids).

How can I retrieve all the data in all the fields without passing in full field list?


Thanks in advance

Nadula
  • October 15, 2014
  • Like
  • 0
You can use this function to retrieve list view data from Salesforce via SOAP API.

Since this function is new, I couldn't find any useful resources on the internet. And PHP Toolkit 20.0 does not work with this new function.
Hence here goes my attempt and it works.

Sample code:
$ListViewOrderBy = new stdclass();	
$ListViewOrderBy->fieldNameOrPath = "Id";
$ListViewOrderBy->nullsPosition = "first";
$ListViewOrderBy->sortDirection = "ascending";		

$ExecuteListViewRequest = new stdclass();
$ExecuteListViewRequest->request = new stdclass();
$ExecuteListViewRequest->request->developerNameOrId = "Your ListViewID";	
$ExecuteListViewRequest->request->limit = 5000;	
//$ExecuteListViewRequest->request->offset = 0;		
$ExecuteListViewRequest->request->orderBy = $ListViewOrderBy;				
$ExecuteListViewRequest->request->sobjectType = "Lead";	
	
$response = $sfConnection->executeListView($ExecuteListViewRequest);
And access data using following:
foreach($response->result->records as $record) { }

This is how I manage to run this API call without uisng PHP Toolkit 20.0
 
$sfConnection = new SoapClient($wsdl_path);

//Login
$loginResult = $sfConnection->login(array (
	'username' => $USERNAME,
	'password' => $PASSWORD
));				
$sessionHeader = new SoapHeader("urn:enterprise.soap.sforce.com", "SessionHeader", array('sessionId' => $loginResult->result->sessionId));
$sfConnection->__setSoapHeaders($sessionHeader);
$sfConnection->sessionId = $loginResult->result->sessionId;		
$serverURL = $loginResult->result->serverUrl;		
$sfConnection->location = $serverURL;

Hope this helps someone.


Cheers
Nadula
  • November 12, 2014
  • Like
  • 1
Hi Guys,

Need some help here,

I want to retrieve all the field data of a particular object.

I see standard retrieve core call (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_retrieve.htm" target="_blank) has three arguments (fieldList, sObjectType, ids).

How can I retrieve all the data in all the fields without passing in full field list?


Thanks in advance

Nadula
  • October 15, 2014
  • Like
  • 0

Hello there,

 

Im having trouble on how to create a listener of salesforce outbound message. Do you have a step-by-step lesson on how to create a salesforce outbound listener ? specially in java and php language ? Please help me.

 

Kind Regards,

 

John