0

I am having some SOQL queries fail when I include the field "Street" when querying for a Lead. This is the kind of query I'm running and the error message back:

SELECT Id, Name, firstName, lastName, Phone, MobilePhone, Street, City, State from Lead WHERE ...

No such column 'Street' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_FIELD"

"Street" is a standard field on the Lead object so would expect it to be there. After doing some research I have read about Field Level Security and that maybe the read access for Street is turned off. I have been trying to verify this with api calls and queries such as

/services/data/v55.0/sobjects/Lead/describe/layouts
/services/data/v55.0/sobjects/Lead/describe

SELECT Id, SObjectType, Field, PermissionsRead, PermissionsEdit FROM FieldPermissions WHERE ParentId IN (SELECT Id FROM PermissionSet WHERE IsOwnedByProfile = true AND PermissionSet.Profile.Name = 'System Administrator'

Select Fields(all) From Lead LIMIT 1

SELECT Id, SObjectType, Field, PermissionsRead, PermissionsEdit FROM FieldPermissions

But in everything I try I cannot find ANY information about the "Street" field at all - it's like it's completely invisible to me. There are hundreds of other custom fields on Lead and I can see them all, but just can't find a single thing about "Street".

I also tried this query:

SELECT Id, SObjectType, Field, PermissionsRead, PermissionsEdit FROM FieldPermissions WHERE PermissionsRead = false

But that returns an empty array. So basically I cannot seem to get any insight as to why "Street" is not available on the Lead object.

I only have API access and cannot check anything in the Salesforce UI.

If you have any ideas, insights, or other things I could try I would really appreciate your help. Thank you so much.

1 Answer 1

0

Lead is a standard object in salesforce. And address is compound field. Street is a part of Address field.

if you query "Select Address from lead" u'll get the object in the query result. so address has things like city, street, country in the Lead object.

U can do the query like "Select City, Street, State,country from lead" to get the information in the address field. are you getting the error for the city ,state and country??

1
  • u can use a chrome extension "salesforce Inspector" this will show the details of the fields to all sobject in the salesforce org. hope this helps you May 12, 2023 at 17:48

You must log in to answer this question.

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