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
Peter KempPeter Kemp 

PHP SOAP search function

Hi,

I'm trying perform a search on Salesforce using the PHP SOAP search function.  I have the ID of an object and would like to check that the user owns that object before allowing them access to it.  I'm read the documentation on SOSL and have come up with this.  Where they find all the careers matching the one chosen, then check that the Contact is the owner of that career

$allowed =     "FIND {\"$careerid\"}
                        IN ALL FIELDS
                        RETURNING
                        Participant_Career__c(ID, Name WHERE Contact__c = \"$contactid\")";

$allowed = $mySforceConnection->search($allowed);

However, this returns an empty object.  I know the $careerid exists in Salesforce but FINDing on the $careerid returns an empty object as well.  Any ideas where I can going wrong?

Thanks

Pete