• SCOTT purcell
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I am using Appery so hopefully someone can help, I need the current users name to do soql queries, but I can not find any documentation on how to capture the userName and store it in localStorage for use. 

I have been using salesforceLogin(); to login to salesforce, but cant figure out how to get the username or id from this. 

Basically I need the same info as a UserInfo.getUserName(); call in Apex

Please help, TIA.
I cannot seem to pass this challenge and I have tried so many different ways.
Here is my  code for .cmp and .app
<aura:component>
    <aura:attribute name="Street" type="String" />
    <aura:attribute name="City" type="String" />
    <aura:attribute name="State" type="String" />
    <aura:attribute name="PostalCode" type="String" />
    
    <div class="addressDetails">
        <div class="street">Street: {!v.Street}</div>
        <div class="state">State: {!v.State}</div>
        <div class="city">City: {!v.City}</div>
        <div class="postalCode">ZipCode: {!v.PostalCode}</div>
    </div>
    
</aura:component>
and my .app
<aura:application >
    
    <h1>Starting the DisplayAddress component</h1>
    <c:DisplayAddress Street="22 north" City="Provo" State="ut" PostalCode="99900"/>
   
</aura:application>

If anyone could help that we be awesome,
TIA
Scott
 
I cannot seem to pass this challenge and I have tried so many different ways.
Here is my  code for .cmp and .app
<aura:component>
    <aura:attribute name="Street" type="String" />
    <aura:attribute name="City" type="String" />
    <aura:attribute name="State" type="String" />
    <aura:attribute name="PostalCode" type="String" />
    
    <div class="addressDetails">
        <div class="street">Street: {!v.Street}</div>
        <div class="state">State: {!v.State}</div>
        <div class="city">City: {!v.City}</div>
        <div class="postalCode">ZipCode: {!v.PostalCode}</div>
    </div>
    
</aura:component>
and my .app
<aura:application >
    
    <h1>Starting the DisplayAddress component</h1>
    <c:DisplayAddress Street="22 north" City="Provo" State="ut" PostalCode="99900"/>
   
</aura:application>

If anyone could help that we be awesome,
TIA
Scott