I am trying using SOAP API with phptoolkit. while trying to query all the order fields I only get standard fields, my order object contains some other fields create due installation of managed package.these fields are not returned and a error is thrown?

How to fix this?

For code sinppet: here it is:

            define("USERNAME", "abhilas[email protected]");
            define("PASSWORD", "dCEm96uPgRHJ");
            define("SECURITY_TOKEN", "AdTdD3hPtVYr1RNbt6re4OnqO");
            require_once ("Force.com-Toolkit-for-PHP-master/soapclient/SforceEnterpriseClient.php");
            $mySforceConnection = new SforceEnterpriseClient();

            $response=$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);
            echo "<pre>";
            print_r($mySforceConnection->query("select id,ordernumber from order"));
            echo "</pre>";


I tried it using WSDL 27.0 available with php toolkit. I returned only ID But gives no error for managed fields.

using latest wsdl of my org. 36.0 it gives error

Here is the snapshot of output https://qas-shared-assets.s3.amazonaws.com/snaps/4uz5infz2gldi

  • Please append namespace in your field name.. Jun 2, 2016 at 7:53
  • Can you share your code snippet? Jun 2, 2016 at 7:54
  • Could you please provide screenshot depicting the error you receive or can you copy the error message in your question? Did you prepend the requested field names with managed package prefix?
    – Patlatus
    Jun 2, 2016 at 9:42
  • @GauravKheterpal updated the code snippet Jun 3, 2016 at 12:35

1 Answer 1


In your salesforce org go to Setup->Create->Objects. Find the object which you want to access. Look for its API Name. The API name will have an namespace prefix attached.

Every managed package has a namespace prefix attached with it. In your Salesforce org if you go to Setup-> Installed Packages. You will find packages with its own namesapce. See the namespace prefix of the managed package you want to access.In order to access any metadata of that package you will have to append namespace prefix.

  • object is already enabled for API access, and I have given all the access. Jun 3, 2016 at 12:28
  • how to fix this issue, Jun 8, 2016 at 10:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .