You need to sign in to do that
Don't have an account?
Sfdc11
User Info in javascript..URGENT!!!!!
Hi,
How to get the loggined User fields in Javascript.can I write SOQL query through connection.js in Homepage components??????
eg,$user.email ,but when I tried to alert its not showing..
var userId={!$user.email};
alert('user'+userId);
Pls Help me out.......
Change like this
var userId='{!$user.email}';
alert('user'+userId);
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
***********************************************************************************************************
CONFIDENTIALITY NOTICE
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.
If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security@rntbci.com with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. RNTBCI and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks.
RNTBCI is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection RNTBCI does not accept any liability.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them.
***********************************************************************************************************
But here it is working fine.
Is this also not working?
var userId="{!$user.email}";
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
You have to write a class, and invoke the same using connection.js, this way you will be able to get the user detail.
Additionally I am not sure about the requirement, you can always use a VF page that is fetched in Homepage component as a IFRAME