You need to sign in to do that
Don't have an account?
nileshj
How to iterate over nested queries?
I have a query [SELECT Id, Type, CreatedById, CreatedBy.Name, CreatedDate, LastModifiedDate, ParentId, Parent.Name, Parent.Type, RelatedRecordId, CommentCount,LikeCount, Body, Title, LinkUrl, ContentData, ContentFileName, (SELECT Id, FieldName, OldValue, NewValue FROM FeedTrackedChanges ORDER BY Id DESC), (SELECT Id, CommentBody, CreatedDate, CreatedBy.Name, InsertedBy.SmallPhotoUrl FROM FeedComments fc ORDER BY CreatedDate DESC LIMIT 2), (SELECT CreatedBy.Name FROM FeedLikes) FROM NewsFeed ORDER BY CreatedDate DESC LIMIT 4]; I want to use InsertedBy.SmallPhotoUrl field from inner query in my visualforce page. How this can be achived? |
Hi Nilesh
Below I provided you a sample for standard object related subquery and how to fetch the subquery field in Visual force page.This might be helpful for you
VF page
Like the above sample,you can fetch your subquery field 'InsertedBy.SmallPhotoUrl' in your VF page.
Thanks
Marris
All Answers
Please try below code:
Hi Nilesh
Below I provided you a sample for standard object related subquery and how to fetch the subquery field in Visual force page.This might be helpful for you
VF page
Like the above sample,you can fetch your subquery field 'InsertedBy.SmallPhotoUrl' in your VF page.
Thanks
Marris
Good Work Marries
Thanks Marris :)
Thanks Premanath.
You are welcome nileshj:-)