You need to sign in to do that
Don't have an account?

forloop cause
Hi all, i dont want to write a soql query in forloop because it bypass the governor limits .so how can i write the soql outside of the forloop.so kindly let me know asap. String[] ps= new String[]{}; public String[] getUserLicense() { return ps; } public void setUserLicense(String[] ps) { this.ps = ps; } public List getItems() { List op = new List(); for(UserLicense p : [SELECT Id, Name FROM UserLicense]) op.add(new SelectOption(p.Id, p.Name)); return op; } == vf: THanks
Hi
Use List, which fetches max of 1000 values in a single line of query.
It solves your problem,Then mark it as solution
Thanks
Marris