+ Start a Discussion

How to remove a value in dropdownlist using apex?


Add method:


 SelectListOfWorkItems.ADD(new SelectOption(WorkItem.id, WorkItem.Name)); 


plz send remove methods...

Chris DaviesChris Davies

I assume your SelectListOfWorkItems is a List of select options, You can simply call the remove method on the list 




i = the position in the list.


If what you're trying to do is remove it from the database, then you need to make this via api.