Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • Are you facing any issue? Commented Jan 18, 2016 at 12:50
  • yeah i am passing id in Account but its for only 1 record... Commented Jan 18, 2016 at 12:51
  • 1
    then pass multiple id or you don't know how to pass multiple Ids. In case use wrapper class. Commented Jan 18, 2016 at 12:52
  • 1
    @Anzar can't add answer due to question being on hold. Firstly convert sel_id into a set of string as "Set<String> sel_idSet = new Set<String>(); sel_idSet.addAll(sel_id );". This is because we don't want repeated IDs while deleting stuff. Commented Jan 20, 2016 at 9:24
  • 1
    Then convert the set of string to set of IDs as " Set<ID> IDsToDelete = (Set<ID>)JSON.deserialize(JSON.serialize(sel_idSet), Set<ID>.class); ". Then query out all the accounts "WHERE id IN :IDsToDelete ". Delete the list of accounts returned in the query. An answer would have looked much better on the yes, sorry. Commented Jan 20, 2016 at 9:26