-
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
From Discovery to Design: Creating Seamless User Experiences in Salesforce
Introduction User experience (UX) plays a major role when implementing Salesforce, as it has a significant impact on user satisfaction and adoption rate which, in…
Schedular Class in Salesforce | Apex Developer Guide
Scheduler Class To arrange a Pinnacle course to run at standard extends, to begin with, compose a Pinnacle lesson that actualizes the Salesforce-provided interface Schedulable.…
Introduction To Workbench In Salesforce
Workbench is a web tool used to interact with Salesforce organizations via API (Application programming interface). You can use Workbench to explore, inspect, edit, migrate…
Popular Salesforce Videos
COVID-19 Impact on The Automotive Industry -Digitization With Salesforce Can be a Solution
Coronavirus is expected to create a physical contactless environment with an increased thrust on online assessment and buying of vehicles. This is a huge shift…
Are Privacy laws anti-marketing? - Salesforce, GDPR and CCPA
Are Privacy laws anti-marketing? Or a great marketing opportunity for organizations? Perhaps the underlying question is: Is your Marketing outreach an unwanted nuisance? Or worse,…
How to Report on the Reports in Your Salesforce Org
Do you want a list of all the reports in your Salesforce org? Would you like to see a list of reports and the last…