• Andrew S Day
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
I have a strange situation here , The same set of code is executing fine in one line , and failing in the other.  I am attaching the image for more details. Also the trail challenge is in complete throwing an error saying the static resource is not referenced . 

you can see the image icon and kitten being displayed for the two lines that we have written.

Thanks in advance.screen shot

I have a account list (aList), i need contact ids list from the account list. How to do it. 
Here i am getting 10 accounts, suppose if each account having 10 contacts than i want all the 100 contact ids in one list.
How to write the loop for this.Below is the code where i am getting all the 10 accounts and 100 contacts in one list.

String baseQuery = 'Select Id,Name,(select Id,Name from Contacts Limit 10) from Account ';
String finalQuery = baseQuery +' where Id IN (select AccountId from Contact) Order By Name limit 10';

List<Account> aList = Database.Query(finalQuery);

Please give me suggestions how to get contacts ids list.


  • September 17, 2014
  • Like
  • 0