You need to sign in to do that
Don't have an account?
Accessing values from related list
Hi,
i have one custom object names FollowUp & one Standard object Contact. I have defined m:m relationship between then using Junction object named Jobj. Noe a related list for that Jobj comes in both contact & Followup object records. I want to access the value present in the related list on records of the followup object.
I tried it this way but it gives an error:
Didn't understand relationship 'Jobjs__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
The code is as follows:
[select id,Name,Comment__c,tre__c,Send_Email__c,IsComplete__c, (SELECT Name,Jobjs__r.First_Name__c FROM FollowUp__c.Jobjs__r) from FollowUp__c WHERE OwnerId = : USERINFO.GETUSERID()]).
How to do it?
Do this way
[select id,Name,Comment__c,tre__c,Send_Email__c,IsComplete__c, (SELECT Name,Jobjs__r.First_Name__c FROM Jobjs__r) from FollowUp__c WHERE OwnerId = : USERINFO.GETUSERID()]).
Akash,
Please try below :-
[select id,Name,Comment__c,tre__c,Send_Email__c,IsComplete__c, (SELECT Name,First_Name__c FROM Jobjs__r) from FollowUp__c WHERE OwnerId = : USERINFO.GETUSERID()]);
//Assuming Jobjs__r is the relationship name between FollowUp__c and Jobjs__c