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
TsvetyTsvety 

"Add" button on list view


Hi,

I would like to create a button on list view so that when the items from the list are selected and the button is clicked, it will add the selected items to another page. On that page there should be the option to remove some of the items if needed.
How can I accomplish this?

User-added image
RatanRatan
You can do that..

Please refer this link https://success.salesforce.com/answers?id=90630000000grS1AAI

https://help.salesforce.com/HTViewSolution?id=000182076&language=en_US


If this solve you problem mark this as best answer to help others.
 
TsvetyTsvety
Hi Ratan,

Thanks for taking the time to reply.
I know how to add a list button. What I don't know is how to add the selected values to another page/object.
RatanRatan
​{!requireScript("/soap/ajax/27.0/connection.js")} 
{!requireScript("/soap/ajax/27.0/apex.js")} 
var selectedRecordIds = {!GETRECORDIDS($ObjectType.Account)}; 
window.open('/VFpagename?Ids='+selectedRecordIds);

Once you created a list view button. You need to add this button to Search Layouts of that object
User-added image

You can open a vfpage with all selected ids

If this solve you problem mark this as best answer to help others.