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
Satyendra Singh 15Satyendra Singh 15 

How do i get profile id by name without SOQL

I am trying to get the profile id but without making any SOQL in trigger
Hi Satyendra,

If you need Current user's profile id then need check this link.

If this answer help's you please mark as best answer.
anil jadhav 8anil jadhav 8
Hi Satyendra,

You can simply use getProfileId() method from UserInfo Class.
Id profileId=userinfo.getProfileId();