Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5930445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:33:23+00:00 2026-05-22T14:33:23+00:00

I have a simple custom contact object (with API name Contact__c) that I’ve created

  • 0

I have a simple custom contact object (with API name Contact__c) that I’ve created in my SalesForce DE site that has a single field (for testing connectivity) of Full_Name__c.

I am then trying to retrieve all of the contacts, specifically this field via PHP:

try {
  $mySforceConnection = new SforcePartnerClient();
  $mySoapClient       = $mySforceConnection->createConnection(API_PATH . '/soapclient/partner.wsdl');
  $mylogin            = $mySforceConnection->login(API_USER, API_PASS . API_SECURITY_TOKEN);

  $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);
} catch(Exception $e) {
  print_r($e);
}

I’ve downloaded the latest partner.wdsl (although as a partner WSDL, it is loosely typed and does not need to be downloaded with the creation/addition of custom objects and/or updated fields, correct?). I’ve verified that the user can connect and see the custom fields via the ForceExplorer. But when I run the above code, it connects but returns just the following:

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

I am not getting any errors, invalid field error, etc, but for the life of me can’t figure out why this isn’t working.

I saw this example here, but it seems to be specific to Enterprise vs Partner, and the need to download the latest enterprise.wsdl every-time you change custom fields.

Any pointers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:33:24+00:00Added an answer on May 22, 2026 at 2:33 pm

    Figured it out I believe, the problem related to how I was parsing the data that was being returned. Instead of feeding the returned data into an SObject, I am now just accessing it directly:

    try {
      $mySforceConnection = new SforcePartnerClient();
      $mySoapClient       = $mySforceConnection->createConnection(API_PATH . '/soapclient/partner.wsdl');
      $mylogin            = $mySforceConnection->login(API_USER, API_PASS . API_SECURITY_TOKEN);
    
      $query = 'SELECT C.Id, C.Full_Name__c
                FROM Contact__c C'; 
      $result = $mySforceConnection->query($query);
    
      for($i = 0; $i < count($result->records); $i++) {
        print_r($result->records[$i]->fields->Full_Name__c); 
      }
    } catch(Exception $e) {
      print_r($e);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a created a simple Custom ServiceHost that inherits from ServiceHost and overrides
I have a simple custom view that is connected via outlet to a NIB.
i'm missing something fundamental here. i have a very simple custom class that draws
I have created a simple Asp.Net custom control which automatically combines all the correct
I have a simple C++ DLL that implements a few custom actions for a
Suppose I have a simple XHTML document that uses a custom namespace for attributes:
I have the following lines in my ~/.emacs.d/init.el (custom-set-variables '(flymake-allowed-file-name-masks (quote ( (\\.cc\\' flymake-simple-make-init)
simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is
I have the following simple custom control that I have defined for a Windows
I have a simple custom user control that uses jqGrid. the control is as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.