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
ekarthikekarthik 

retrive standard user object value in custom object query OR 2 action method in single repeat

 

I need to get several fields from user created custom  object , from that example

getting values using

 

select id, name, createdbyid from project_task__c 

 

From this i need to get 

 

select smalllphotourl from user where id=:createdbyid 

 

these results  needs to be placed with in a repeat .

 

how can i process?

 

i tried both query within one quuery but unable to get standard object value in custom object query...

 

 and i am unable to get two action methods with in a single repeat .. how to process . 

 

sfdcfoxsfdcfox
Did you try:

SELECT Id,Name,CreatedById,CreatedBy.SmallPhotoUrl FROM Project_Task__c

This should allow you to access it via:

{!taskItem.CreatedBy.SmallPhotoUrl} (replace taskItem with the repeat var attribute).
ekarthikekarthik
hi


It works but i also need owner smallphotourl. Itried using the code
SELECT Id,Name,owner.smallphotourl,CreatedById,CreatedBy.SmallPhotoUrl FROM Project_Task__c


owner.smallphotourl, --- this field causes error i dont know how to do this .
Any help appreciated .
Thanks in advance
sfdcfoxsfdcfox
If Project_Task__c has a master-detail relationship with another object (Project__c?), then it will not have an OwnerId field, and thus will not have an Owner relationship. Instead, you'll have to retrieve the owner of the parent record, instead.