Sunday, April 5, 2020

How can we efficiently generate a List of Id from a List of SObject structure with just one line of code?


Do you know how to get a list<Id> from a list<SObject>? Yes, doing a loop of the list of SObject and then put each record Id into another list or set. 

What if this was possible in just one line of code?

Infact, it is possible to write this in just one line of code. Don't believe me? Take a look below. 

Let say we have a list of contact records from which we only want to extract the list of record Ids.

Cheers

11 comments:

  1. Thanks for sharing excellent informations. Your web site is very cool. I am impressed by the details that you’ve on this site. 야설
    Feel free to visit my blog :
    야설

    ReplyDelete
  2. Admiring the time and energy you put into your blog and in depth information you offer. It's good to come across a blog every once in a while that isn't the same outdated rehashed material. Fantastic read! I've bookmarked your site 일본야동
    Feel free to visit my blog : 일본야동

    ReplyDelete

  3. This web site certainly has all of the information and facts I needed concerning this subject and didn't know who to ask. 국산야동
    Feel free to visit my blog : 국산야동

    ReplyDelete
  4. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. 일본야동
    Feel free to visit my blog : e 일본야동

    ReplyDelete

  5. It's late finding this act. At least, it's a thing to be familiar with that there are such events exist. I agree with your Blog and I will be back to inspect it more in the future so please keep up your act 야설
    Feel free to visit my blog : 야설

    ReplyDelete