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
GauriiGaurii 

Query Not Working

My query is not working i have the below query which works fine but when i try use Id in clause it doesnt show me any records.
'select id,profile.name from User where profile.name = \test1\' OR profile.name =\Test2\''; This works fine.
But the below one doesnt work.Could you please suggest?
select id from User where id in ('00eg0000000M4XY', '00eg0000000M3TR')
 
 
Naresh YadavNaresh Yadav
Hi swa

Try this one.

select id,profileId from User where profileId = '00e90000001rjvu'
mritzimritzi
Use following code:
List<Id> idList = new List<Id>();
idList.add('00eg0000000M4XY');
idList.add('00eg0000000M3TR');
List<User> userList = [Select Id From User Where id IN:idList];


If this works for you, Select this as Best Answer