I have a profile xyz where the license is customer community plus and i have experience cloud site.
String profileName=[Select Id,Name from Profile where Id=:userinfo.getProfileId()].Name;
this query is not working all of the sudden for abc customer it is working why not for xyz customer
error which i am getting is sObject type 'Profile' is not supported.
I also tried querying via user object and without sharing as well still not working
String profileName = [SELECT
Profile.Name FROM User WHERE Id = :UserInfo.getUserId()].Profile.Name;
#Apex #Lightning Web Component Communication #Experience Cloud #Profiles
@Ashwini Garwandha I am getting error Method does not exist or incorrect signature: void getProfileName() from the type System.UserInfo (37:39)
Even I checked the documentation I dont see getProfileName() method itself.
Please help I need to fetch the logged in user's profile name.
And also abc customer's license is also customer cummunity plus itself not an internal user.