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
trf199trf199 

API v17 Find Has Stopped Working with INVALID_TYPE: sObject type 'lead' is not supported.

I have been executing the following query with success for a while now (over a year):

 

find {01234567890} in phone fields returning

contact(id, phone, firstname, lastname),

lead(id, phone, firstname, lastname),

account(id, phone, name)

 

But this has suddenly stopped working with the error

 

INVALID_TYPE: sObject type 'lead' is not supported.

 

I have tested using System Log and the following query:

 

List<List<SObject>> searchList = [find '01234567890' in phone fields returning contact(id, phone, firstname, lastname), lead(id, phone, firstname, lastname), account(id, phone, name)];

 

And the query works with no errors about the lead type.

 

This works on an org with the jumping dog logo, but doesn't work on an org with the sun logo. (Both are '11).

 

Any help would be appreciated.

patrickqpatrickq

We just got a report from one user of an app we have that is using the API with the same exact error while trying to export a contact as a new lead. It's the first time we get that report so I have to assume it's something unusual with that user's Salesforce account. Did you ever get a resolution for your issue?