• Samuel Hernandez
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello Developers,

I am trying to get the profile administrator id as accurately as possible. Currently my solution is using this query:
SELECT Id, Profile.Name, CreatedDate
FROM User
WHERE UserType = 'Standard'
AND Profile.PermissionsModifyAllData = true 
AND Profile.PermissionsManageUsers = true 
AND Profile.PermissionsManageProfilesPermissionsets = true
AND IsActive = TRUE
ORDER BY CreatedDate ASC 
LIMIT 1
I would like to know if there are more accurate ways to get the admin profile id from a unique field. Any ideas?

Thanks!
 
Hello Developers,

I am trying to get the profile administrator id as accurately as possible. Currently my solution is using this query:
SELECT Id, Profile.Name, CreatedDate
FROM User
WHERE UserType = 'Standard'
AND Profile.PermissionsModifyAllData = true 
AND Profile.PermissionsManageUsers = true 
AND Profile.PermissionsManageProfilesPermissionsets = true
AND IsActive = TRUE
ORDER BY CreatedDate ASC 
LIMIT 1
I would like to know if there are more accurate ways to get the admin profile id from a unique field. Any ideas?

Thanks!
 
Hello Developers,

I am trying to get the profile administrator id as accurately as possible. Currently my solution is using this query:
SELECT Id, Profile.Name, CreatedDate
FROM User
WHERE UserType = 'Standard'
AND Profile.PermissionsModifyAllData = true 
AND Profile.PermissionsManageUsers = true 
AND Profile.PermissionsManageProfilesPermissionsets = true
AND IsActive = TRUE
ORDER BY CreatedDate ASC 
LIMIT 1
I would like to know if there are more accurate ways to get the admin profile id from a unique field. Any ideas?

Thanks!