+ Start a Discussion
LinThawLinThaw 

No such column 'xxx' on entity 'xxx'.

Hi,
I am running following soql in developer console.

Select Count(Id) From User Where UserType = 'CSPLitePortal' and isActive = false

I got following error. 
No such column 'UserType' on entity 'User'

and also got same error when trying with other standard fields or custom fields.

this soql is working well in sandbox but error in production org.
running user's profile is standard administrator.

any suggestion or idea?

Thanks & Regards
LinThaw
Best Answer chosen by LinThaw
Khan AnasKhan Anas (Salesforce Developers) 
Hi Lin,

Greetings to you!

+1 Andrew

Please make sure 'Use Tooling API' checkbox is unchecked while executing the query in Query Editor.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Andrew GAndrew G
Hi Lin

I would normally suggest checking the the field exists, but it is a standard field.

Next step would be to check the permissions on the field in the production environment.

Regards
Andrew
Khan AnasKhan Anas (Salesforce Developers) 
Hi Lin,

Greetings to you!

+1 Andrew

Please make sure 'Use Tooling API' checkbox is unchecked while executing the query in Query Editor.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
LinThawLinThaw
Thanks Khan Anas,  It works!