function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rowan  ChristmasRowan Christmas 

Accessing LastModifiedDate on custom object

Hi All, 

I have the following code:
 
<aura:iteration items="{!v.insights}" var="insight">
        {!insight.Name}
        <br></br>
        {!insight.LastModifiedDate}
        <hr></hr>
    </aura:iteration>

This works fine for "Name". What am I doing wrong to access the LastModifiedDate?

Thanks!
pconpcon
Are you querying this object?  Did you include LastModifiedDate in the query?  Are you getting any errors or just not getting the field displayed?
Rowan  ChristmasRowan Christmas
Yes I tested in SOQL and there are values. I'm just not getting anything in the UI
Rowan  ChristmasRowan Christmas
Oh, you mean is it in the query for the apex class. I totally forgot that I had to return that, I always expect objects to have their full API avail. Thanks for jogging my mind :-)
pconpcon
Yeah, I mean the backing data query before displaying it on the page.  If you add it there does it show?
Rowan  ChristmasRowan Christmas
I will test when I get home, I'm 99% sure this is the issue.