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
Surender reddy SalukutiSurender reddy Salukuti 

query problem

hi,
when i wrote query in query editor.

select id from user where profile='system administator'
error-
[object Object]: select id from user where profile='system administator' ^ ERROR at Row:1:Column:27 No such column 'profile' on entity 'User'. 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.


below question

fetch all the account Records from Account  which are owned by the user whose profile is System Admin and re-assign to User whose profile is manager how can i achive

 
vinod ram 9vinod ram 9
Hi Surender,

Please try below Query,

Select id,name,profile.name from user where profile.name ='System administrator'


Regards
Vinod
Raj VakatiRaj Vakati
Use this SOQL 

select id from user where Profile.Name='system administator'

AND 

select id from Account where Owner.Profile.Name='system administator'



 
Naveen PoojaryNaveen Poojary
Hi Surender,
System administrator profile API is name Admin. use the API name instead of.System administrator.
Make it as best answer if it helps you
Thanks