You need to sign in to do that
Don't have an account?
gaurav.sfdc
Access Contact.Email from Case object
If I run below query in query editor it runs fine and give all fields but in Apex or execute anomynous it gives just CaseNumber, ContactId, ID.
List<sObject> lst = [SELECT CaseNumber, Contact.FirstName, Contact.LastName, Contact.Email, ContactId, Id FROM Case WHERE ID IN('500o0000001OaQsAAK','500o0000001OaR0AAK','500o0000001OaQeAAK') and Contact.Email <> null order by CaseNumber limit 10000];
System.debug(lst);
Any help would be appreciated
List<sObject> lst = [SELECT CaseNumber, Contact.FirstName, Contact.LastName, Contact.Email, ContactId, Id FROM Case WHERE ID IN('500o0000001OaQsAAK','500o0000001OaR0AAK','500o0000001OaQeAAK') and Contact.Email <> null order by CaseNumber limit 10000];
System.debug(lst);
Any help would be appreciated
not sure about the explanation why it is not showing when you put it in this form but you can always see results by accessing every individual list row from a for loop. Also please notice when you have more data showing whole list or map from System.debug is limited on somwhere around 20 records as I remeber it is always better way to show your exact data row by row regardeles to ammount.
All Answers
not sure about the explanation why it is not showing when you put it in this form but you can always see results by accessing every individual list row from a for loop. Also please notice when you have more data showing whole list or map from System.debug is limited on somwhere around 20 records as I remeber it is always better way to show your exact data row by row regardeles to ammount.