There are two lists (UserProduct And List Product), each of them holding Product code and Product Name.

On selecting a particular user from picklist UserProduct Lists displays Products based on picklist value and ListProduct displays all the Products in org. Including Products displayed in UserProduct Lists.

How to remove the Products of UserProduct List displayed in ListProduct Lists?

  • 1
    Are you talking about an apex or javascript controller? Apr 16, 2018 at 11:25

1 Answer 1


You should use the List.clear() method right before refilling the list.

Here you can see the reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_list.htm#apex_System_List_clear

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .