• thanks good post piyush soni,
    How to get all list of logged users in Salesforceforce org and Display in Lightning component

  • If email address is ‘[email protected] on user profile, we can fetch the User name from email on user profile without server call.

    Lightning Component :

    <aura:component implements=”flexipage:availableForRecordHome>
    <aura:attribute name=”UserName” type=”String” default=””/>

    javaScript controller :

    ({ doInit : function(component, event, helper) {
    var UserName =  $A.get(“$SObjectType.CurrentUser.Email”);
    cmp.set(“v.UserName”,(UserName.substring(0, UserName.lastIndexOf(“@”))));

  • Hello, I am using a very similar code to display the ” Welcome ‘user name’ !” on a community page. it displays the name for Admin Users , but not for everyone. what am I missing? Thank you

Leave a Reply