Hello Friends !,
I am integrating the report of lead source from salesforce.com on mywebsite using mysql query method, i have purchased the API access and integrated , but i dont know here how will fetch the records without the relation to the table query, i mean how to fetch without userid or like that, do you have understand what i am confusing here, you can understand after viewing my code what i am using,
My code :
PHP Code:
=========================
require_once ('soapclient/SforceEnterpriseClient.php');
require_once ('soapclient/SforceHeaderOptions.php');
// Login to salesforce.com
$USERNAME = 'xxxxxx@xxxxxx';
$password = 'xxxxxx';
$key = 'xxxxxx';
//join Password and Key here
$PASSWORD = $password . $key;
try {
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection('soapclient/enterprise.wsdl.xml');
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
$accounts=$mySforceConnection->retrieve('xxxxxx','','');
$query = "SELECT Id,Name,Title,Company,Email,Status,PostalCode,CreatedDate FROM `Lead` Where ";
$response = $mySforceConnection->query(($query));
foreach ($response->records as $record) {
print_r($record);
}
} catch (Exception $e) {
echo $mySforceConnection->getLastRequest();
print_r($e);
}
plz give me the ideas to fetch the lead source and i need to show on my website, thanks in advance friends !
Bookmarks