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
Brijesh KumarBrijesh Kumar 

from system admin account find all profile names

Hi
 
I loging as a system admin account & i wants all profile name in apex class.
can you give me a solution how can i get.
please help me
 
Thanks & regards
Brijesh kumar baser
hisrinuhisrinu
Hi Brijesh,

 In explorer you can get all the profiles using this following query.

Select p.Name from Profile p;

But this query will not execute in apex class, I guess so.

But try this, all the best.
hisrinuhisrinu
Hi Brijesh,

You cannot perform create, update or delete, but you can retrieve the values (only select statement will work).

All the best::)
Brijesh KumarBrijesh Kumar
Thanks your immediate reply.This solution is great for me.
 
Thanks & Regards
Brijesh Kumar baser