You need to sign in to do that
Don't have an account?
bhanu_prakash
get query of logined in user match with contact
Hi Team,
I am working on communities, how to get login in the user info.
I am using standard objects such as account, contact, and cases.
In under contact, we have checkbox has superuser. If it is checked login user need to able to view info of all cases associated with the account.
I am working on communities, how to get login in the user info.
I am using standard objects such as account, contact, and cases.
In under contact, we have checkbox has superuser. If it is checked login user need to able to view info of all cases associated with the account.
Id accId = [select contactid, contact.accountid from user where id = :userid].contact.accountid; case ca = [SELECT AccountId,contact.Superuser__c ,CaseNumber,Id,Status FROM Case where status != null and contact.superuser__c = true and accountId =: accid];Thanks for advance
Link (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_userinfo.htm)