I have searched about sales force Lightning ..That time I got one Intersting Link

<aura:iteration> won't work with your database object untill u wire up a controller class in your component and write the method inside the controller to fetch the data.

For Information please refer below link https://developer.salesforce.com/forums/?id=906F0000000B37pIAC

I want to know the exact reason beyond this line ???!!!...


  <aura:component controller="SamplePic">
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="User" type="User[]"/>
    <p>  Simple Image Component</p></center>

 <aura:iteration items="{!v.User}" var="User">


doInit : function(component, event, helper) {
    alert('page loading calling @@@');
    var action=component.get("c.SamplePic1");
        var state=a.getState();
            alert('success value');
            //alert('list value ::::::'+JSON.stringify(a.getReturnValue()));



  public class SamplePic {
public static String photoURL {get;set;}
public  static List<User> SamplePic1() {
    system.debug('::::: usr method is calling :::');
    return[SELECT Id,smallPhotoURL FROM User];



  • Did you implement anything and stuck in a specific scenario or question? – Raul Mar 8 '17 at 12:07
  • @RahulSharma In above code Iam getting user Id in component,but Iam not getting smallphotoUrl ...Once I used FullPhotoUrl Its working...Simply I searched in Google So I got this link developer.salesforce.com/forums/?id=906F0000000B37pIAC ..So I have asked the question – Annappa Mar 8 '17 at 12:20

The merge variables are case sensitive and {!User.smallPhotoURL} is the wrong case. It should be {!User.SmallPhotoUrl} instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.