Created
February 21, 2022 06:28
-
-
Save amitastreait/e0345b84d05687cc4b2e75a8144d28f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class VE_AutoLeadController { | |
public List<String> leadIdsSet { get; set; } | |
public List<Lead> selectedLeadRecords { get; set; } | |
public VE_AutoLeadController(ApexPages.StandardSetController setController) { | |
selectedLeadRecords = (Lead[])setController.getSelected(); | |
leadIdsSet = new List<String>(); | |
for(sObject sobj : setController.getSelected()){ | |
leadIdsSet.add( (String)sObj.get('Id') ); | |
} | |
// SOQL on Lead Object if you need more Fields | |
selectedLeadRecords = [SELECT Id, Name, Company, Phone, Email, Rating FROM Lead WHERE Id IN: leadIdsSet]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment