Hi below I have described how can u do a simple profile check on the user without creating any id list or set
//Creating a list to get the current user via the UserInfo.getProfileId() Listpro = [SELECT id,Name FROM Profile where id = :UserInfo.getProfileId()]; //checking the profile via the name if(pro[0] != null && pro[0].name.contains('Profile name')) //
No comments:
Post a Comment