You need to sign in to do that
Don't have an account?
Phu Dang 1
How do I get the useranme from the Communities login page and pass to a live chat method?
I have SF Communities and would like to add live chat. In the live chat there is a method that pick up the email address. Once it picks up the address, it will pull the contact from Salesforce. Here is the live chat method: SnapABug.setUserEmail('email@domain.com' (mailto:'email@domain.com')). Since the login for SF Communities uses email address, I would like to use this email address and pass to the live chat method. We are using the standard SF Communities webpage. Is there a way to pass the login from the login page to the the method above which is in the footer of the SF Communities web page. Here is the code for the live chat that I put in the footer.
To get the user's email address of user logged in your SF community. you can do following:
In Apex you can use: String emailAddress = UserInfo.getUserEmail();
In VF page: {!$User.Email}
Hope this helps.
Regards,
Grazitti Team
Web: www.grazitti.com
It will be landing page. The user must be logged in to view the userinfo details.
Let us know if you have any question. Please don't Forget to Mark this as your best answer if it works fine for you
Regards,
Grazitti Team
Web: www.grazitti.com
<apex:variable var="email" value="{!$User.Email}" />
<script>
var emailtest= document.getElementByVar('{!$Component.communitiesLandingPage.email}');
var em = outTextComponent.innerHTML; // as output Text renderd Span element.
</script>
Hi Grazitti Team,
This is what I put in the landing page. Is this correct? I want to pass the email variable from the landing page to an html page that has a Script function : SnapABug.setUserEmail('email@domain.com' (mailto:'email@domain.com')). I don't know how to pass the variable using javascript. Please help. Thank you.