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
Dinesh Singh 13Dinesh Singh 13 

How to identify logged in user (Salesforce Community)

Hi,
Below is the problem we are trying to resolve. 
- We have bought an Appointment booking product (Booking Bug)  which will be added to our customer community.
- Community user will click on a button/link to book appointments 
- Appointment booking screen opens in an iFrame
- user books the appointment
- At the end of process we want the appointment system to auto populate logged in user details ( Contact Name, email, Account name, Number)  on the appointment  booking form.

we are exploring the use of connected Apps to get the details however there are challanges with that. 
Are there any mechanisms/solutions to resolve this problem.

Thanks,
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Dinesh,

May I suggest you please refer the below link for reference. Hope it will help.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
 
Piotr GajekPiotr Gajek

Check it:

https://salesforceprofs.com/how-to-detect-log-in-to-community-as-user-in-apex/