You need to sign in to do that
Don't have an account?
get Custom profile names in SOQL
Hi All,
how to get only Custom profile name in soql query.... whic field am i use in where condition
Select p.UserType, p.UserLicenseId, p.PermissionsViewSetup, p.PermissionsManageUsers, p.PermissionsManageDataCategories, p.PermissionsManageDashboards, p.PermissionsManageCustomReportTypes, p.PermissionsManageChatterMessages,
p.Id,p.name, p.Description, p.CreatedDate, p.CreatedById From Profile p where p.PermissionsViewSetup = true
you can query directly like this.
select Id, Name from Profile where name =' system Amin';
If this answers your question make this as a solution and give KUDOS.
for getting profile name in SOQL
use as below
[select Name from Profile ] ;
second way if you want to get name of profile of current user without SOQL
on VF Page
{!$Profile.Name}
I want only custom profile names through SOQL
can u help any body...
Hi I have found this answer from some discussion on baords and facebook Salesforce community members.
You can do this first of all you need to find CreatedDate time of organization and then based of that time and date you can fetch profiles because Standard profile's created Date and time should be same as Organization.
Datetime DT = [Select id , CreatedDate from Organization ][0].CreatedDate ;
List<Profle> Profiels = [select id , Name from Profile where CreatedDate = : DT ] ;
I know its been ages since this question is raised. I am hoping this would help someone who is visiting this now...
Assuming that all the profiles that are created by System Admin would be Custom profiles, you can run this query:
[ select id, name from Profile where createdby.Profile.Name = 'System Administrator' ]
This should resolve your issue! Let me know if there's anything I need to learn here!
Thank you!