+ Start a Discussion
trf199trf199 

Finding contacts with no account just stopped working

We use the API to SOSL search contacts based on a phone number as below:

 

"find {" + _utilities.EscapeSalesforceSpecialCharacters(clid) + "} in phone fields returning "
                                  + "contact(id, phone, firstname, lastname), "
                                  + "lead(id, phone, firstname, lastname), "
                                  + "account(id, phone, name)";

 

(We're also looking for accounts and leads).

 

Just recently it has stopped returning any contacts where the account field is not set. We have tested this on three developer orgs - all on NA7. 1 of the orgs returns contacts where no account is set, but the other two now don't. We've tested this by pointing the same bit of unit testing code at each org in turn and seeing which return contacts with no account. Seems strange that it would suddenly stop working.

 

Is there any setting in an org which would prevent contacts with no account from being searched in this way? Anyone have any ideas?

 

Thanks..

werewolfwerewolf

Did you perhaps turn on a private sharing model on Accounts or Contacts?  In a private sharing model, contacts with no accounts are visible only to the contacts' owners.

njdnjd

The settings appear to be the same in both orgs. Both the working and non-working orgs have the following sharing settings for Accounts and Contacts:

 

Account, Contract and Asset       Public Read/Write

Contact                                                Controlled by Parent

 

Both have Grant Access via Heirarchies enabled

 

Any other clues?

 

werewolfwerewolf

Nope, sounds like a case for Salesforce.com Support.