function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
micahmicah 

Soap API doesn't have access to Common Ground package fields

I am trying to write a program that uses the Force.com Toolkit for PHP. When I run queries that select fields that are part of the Convio Common Ground package those fields are not getting returned in the results.

 

When I run those same exact queries with the same username, password, and security token using Force.com Explorer I do get those fields in the result.

 

I have verified that the user I'm using has the Common Ground package marked as Active. While logged on as this user I generated a new enterprise.wsdl.xml which contains these custom Common Ground fields in it, and I'm loading this file when connecting to SalesForce. But still I'm not able to select any Common Ground fields.

 

Any idea how I can make this work? Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

Can you clarify how its not working, do you get an error from your query? or is the data just not in the results object? if the latter PHP has a tendency to overcache the wsdl file and not pick up changes, there's a flag you can change in php.ini, see some of the posts in the PHP forum.

All Answers

sfdcfoxsfdcfox

If my understanding is correct (I've not yet had a scenario where I needed this), you may have to use PackageVersionHeader. Just follow the directions for setting the header like you would any other header (I believe there's a PHP LoginScopeHeader example).

SuperfellSuperfell

Can you clarify how its not working, do you get an error from your query? or is the data just not in the results object? if the latter PHP has a tendency to overcache the wsdl file and not pick up changes, there's a flag you can change in php.ini, see some of the posts in the PHP forum.

This was selected as the best answer
micahmicah

Hi SimonF, I think it must have been a PHP caching issue, because the problem went away the next day. What was happening was that my queries were getting executed fine and without errors, even though the queries included custom Common Ground fields names in them, but the objects returned just didn't include those fields.

 

I realized that I had generated the enterprise.wsdl.xml with a user that didn't have the Common Ground package installed, and that file didn't include any of the Common Ground fields in it. So I regenerated it with the right user and replaced it, but my queries still weren't returning any Common Ground fields.

 

The next day though it was, so overcaching is the only thing I can think of. Thanks for your help!