• pmmenneg
  • NEWBIE
  • 25 Points
  • Member since 2010

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

 Hi all.  I am starting my first application, and am connecting via PHP using the partner.wsdl.  I have created a custom 'Contact' object, and am now trying to pull this data via PHP.  Here is the query:

 

$query = 'SELECT C.Id, C.Full_Name__c
          FROM Contact__c C'; 

$result = $mySforceConnection->query($query); $sObject = new SObject($result->records[0]); print_r($sObject);

 

I have successfully connected and made a query, but the query is simply returning an empty result of (using PHP's print_r):

 

 

SObject Object ( [type] => Contact__c [fields] => [Id] => a )

 

Am I dealing with some kind of visibility issue with my custom object?  I have a number of 'Contacts', and the fields I am querying are correct, but again, no data.

 

Thanks for any pointers/assistance, it is truly appreciated!

 

 Hi all.  I am starting my first application, and am connecting via PHP using the partner.wsdl.  I have created a custom 'Contact' object, and am now trying to pull this data via PHP.  Here is the query:

 

$query = 'SELECT C.Id, C.Full_Name__c
          FROM Contact__c C'; 

$result = $mySforceConnection->query($query); $sObject = new SObject($result->records[0]); print_r($sObject);

 

I have successfully connected and made a query, but the query is simply returning an empty result of (using PHP's print_r):

 

 

SObject Object ( [type] => Contact__c [fields] => [Id] => a )

 

Am I dealing with some kind of visibility issue with my custom object?  I have a number of 'Contacts', and the fields I am querying are correct, but again, no data.

 

Thanks for any pointers/assistance, it is truly appreciated!

 

I've created a Opportunity Contact field for Opportunity which is a lookup on the Contact table.

 

From salesforce I can see the contact and work with it and everything looks happy.

 

But when trying to access the contacts information using PHP I get nothing. I'm using the following code:

 

	$queryOpportunity = "Select AccountId, Amount, Paid__c, Opportunity_Contact__c from Opportunity WHERE Id = '$id'" ;
	$OppResponse = $mySforceConnection->query(($queryOpportunity));
	foreach ($OppResponse->records as $OppRecord) {
		$subtotal = $OppRecord->Amount ;
		$email = $OppRecord->Opportunity_Contact__c->Email ;
		var_dump($OppRecord) ;
		var_dump($OppRecord->Opportunity_Contact__c) ;

 

 

And I can't get any of the information for the contact. Help.

 

Also, Instead of grabbing the AccountID and doing a seperate query on account is there anyway to just grab the account information with this query as well?