You need to sign in to do that
Don't have an account?
Hema Yejju
A non foreign key field cannot be referenced in a path expression: Case_Exts__r at line 1,686 column 23
I have one query and when im trying to iterate over it was showing the error.
[SELECT AccountSource,Account_Status__pc,Address_Verification_Status__pc,Agency_Code__c,Agency_Display_Name__c ,(
SELECT Applicant__c,Appraisal_Value__c,Area__c,Account__c FROM Case) FROM Account WHERE Id IN: caseIdList];
I have this query while im writing like this :
for(Account cs:acclist){
if(cs.Case__r.Area__c!=null){
htmlBody += '<tr><td style="border:1px solid red">' + 'CaseNumber' + '</td><td style="border:1px solid ">' + cs.CaseNumber + '</td></tr>';
}
[SELECT AccountSource,Account_Status__pc,Address_Verification_Status__pc,Agency_Code__c,Agency_Display_Name__c ,(
SELECT Applicant__c,Appraisal_Value__c,Area__c,Account__c FROM Case) FROM Account WHERE Id IN: caseIdList];
I have this query while im writing like this :
for(Account cs:acclist){
if(cs.Case__r.Area__c!=null){
htmlBody += '<tr><td style="border:1px solid red">' + 'CaseNumber' + '</td><td style="border:1px solid ">' + cs.CaseNumber + '</td></tr>';
}
Your Query is looking worng. if you want to get Account child record Case then you have to use Cases. and if you are using Custom object then you need to try Case__r.
Below code will help you for better understanding.
take reference from above code.
don't forget to mark it as best answer.
Thank you
All Answers
Your Query is looking worng. if you want to get Account child record Case then you have to use Cases. and if you are using Custom object then you need to try Case__r.
Below code will help you for better understanding.
take reference from above code.
don't forget to mark it as best answer.
Thank you
here is your code reference. try both code and let me know your status.
don't forget to mark it as best answer.
Thank you
did you try above solution.
let me know by marking it as best answer.
don't forget to mark it as best answer.
Thank you