You need to sign in to do that
Don't have an account?
jayasuriya janarthan
Removal of List elements from another Lists?
There are two lists (UserProduct And List Product) , each of it 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?
Sorry for this issue you are encountering.
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
Hope this helps.Kindly mark this as solved if the information was helpful.
Regards,
Nagendra