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
sfpsfp 

In security scanner, got the warning Queries_With_No_Where_Or_Limit_Clause?

Hi All,

Query Name - Queries_With_No_Where_Or_Limit_Clause
Severity - Warning
17. public void loadUserList() //userlistcontroller.cls
18. total_size = [SELECT count() FROM User__c];

Please help out this issue.

Kind Regards,
Mohan
sfpsfp
I have added the query like this Where clause. 
SELECT count() FROM User__c WHERE Id != null

Is it okay, I guess. 
 
Neetu_BansalNeetu_Bansal
yes