Earlier days we used to use Custom Permission in Visualforce page and Formula fields etc. We used to assign custom permission to a permission set. and We used to have one utility method to check whether user has permission set or not. public static Boolean doPermissoncheck( String sPermissionName, String sUserId){ Boolean isPermAssigned; List < PermissionSetAssignment > lstOfAssignment = [ SELECT Id , PermissionSet . Name , AssigneeId FROM PermissionSetAssignment WHERE PermissionSet . Name =:sPermissionName AND AssigneeId =:sUserId]; isPermAssigned = lstOfAssignment.isEmpty()? false : true ; return isPermAssigned; } What If we want to know custom permi...
A place where you have to land for exploring Salesforce