function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shruti VishShruti Vish 

I want convert Set<String> latest= Set<String> to list<Account> lst = list<Account>

Please can anyone help from this.
om gupta(sfdc)om gupta(sfdc)
List<Account> lst = new List<Account>();
for(String accName : latest){
    lst.add(new Account("name":accName));

}
pradeep kumar yadavpradeep kumar yadav
List<Account> acc = new List<Account>();
for(String str : latest){
  acc.add(new Account(Name = str));
}