-
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
How to Improve Salesforce Development & Delivery
Salesforce is a pretty crucial element in today’s business sphere that accommodates marketing, sales, IT, operations, and more departments. Salesforce shows its competency through Customer…
Can Salesforce Einstein AI Help in Sales Qualification?
Sales Qualification is an inevitable process and an important one for all sales teams. If you go to the market, you pick vegetables based on your…
Why Should you Hire a Salesforce Pardot Consultant: Key Reasons to Know
Are you finding Salesforce Pardot Implementation a daunting task? Don’t worry. We are here with our complete guide on Salesforce Pardot Consultants and why should you hire them. What…
Popular Salesforce Videos
Salesforce Summer '18 Release
I can’t believe Summer ’18 is already here in no time. I don’t know about all of you, but I still have my winter stuff…
Rise & Shine with The Salesforce Women's Entrepreneur Group
The Salesforce Women’s Entrepreneur Group invites you to our first quarterly event of the year, Rise & Shine - Celebrating Women’s History Month. We are…
Salesforce Integration: How to Do it the Best Way?
Once you deploy Salesforce solutions to improve the operation of your enterprise, your next logical step is to enhance the overall functionalities by integrating Salesforce…