Sunday, August 11, 2019

Accessing Child Records from sObjects using getSobjects method

Dynamic queries plays very important role when we need to run different SOQL based on different inputs. By using dynamic apex, we can store the output of queries in sObjects list and then can even check if parent record contains any child records. Even if you want to fetch child record information then you can use "getSobjects('relationshipname') method to get child information.

Below is code snippet to get all opportunities and contacts information related to Account:

Hope this will help!!!

9 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Hello, dear author, thank you so much for the detailed information! I hope that i will use it in my blog here https://jetwriting.com/dissertation-writer/ and you can read it as well!

    ReplyDelete
  5. Hey, this day is too much good for me, since this time I am reading this enormous informative article here at my home. Thanks a lot for massive hard work. word family is

    ReplyDelete
  6. Visit Declare to explore new dress designs. We have everything from stylish to trendy dresses. Keep up with the latest fashion trends today. Shop now to add new design dresses to your wardrobe!

    ReplyDelete
  7. Discover top women clothing brands in Pakistan that offer fashionable dresses for any occasion. Shop a huge selection of fashion and much more including modern dress to traditional dress.

    ReplyDelete