-
How can I efficiently generate a Set from a List structure in salesforce?
Hi all,
I have a bit of code where I've written a SOQL query that returns a list of SObject records, however I need a Set<Id> structure to pass to another method that I don't have control of (and thus can't change the method signature of).
How can I turn my returned List<SObject> into a Set<Id>? Is the best option just a for loop? Any guidance is appreciated.
Thanks
Log In to reply.
Popular Salesforce Blogs
Revenue Optimization with Salesforce - A Complete Overview
Some areas of the world are slowly returning to normal conditions. However, many supply chains are still disrupted. This, in addition to rapidly changing market…
A 'Deep Clean' for Your Salesforce Org: Data and Metadata
As your business grows, so will your Org. And while a highly customized Salesforce Org reflects a booming business, there’s a critical difference between necessary…
Popular Salesforce Videos
Introduction to Salesforce CMS
Salesforce CMS is a hybrid content management system, where you can curate and share content, manage multiple language versions of your content, and control who creates…
How to Prepare for a Salesforce Job Interview
Watch this video to learn how to Prepare for a Salesforce Job Interview.
Kanban View and Personalisation | Salesforce Training
In this short video, we will show you the Kanban view in Salesforce Lightning and how it can be personalized. Check out this amazing and…