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
sultansultan 

which parameter we need to pass in system.runAS() method?

Best Answer chosen by sultan
adityaMorganadityaMorgan
Query on User object and paas that user.
Example :

User u = [select Id from user where isActive = true limit 1];
system.runAs(u){

// your code.

}