+ Start a Discussion

Customize List Button

I have an Prpblem Related to Customize List Button.
I want to add multiple oprtion in One Button(For Mass Update)
Chnage Owner
Change Role
Change Type
Change Status
I want to put all those option in one List button for Mass Update.
How can I do this.Can you plz help me ...


you can do this by the following method -

On the onclick of the custom button do this javascript coding-

//start code


var arrSelectedRecordIds = {!GETRECORDIDS($ObjectType.navhf__Fundraising_Contact__c )}; //Here you will get all the selected records ids as an array.

var arrTemp=new Array();

if(arrSelectedRecordIds .length != 0)


for(var i=0;i<arrSelectedRecordIds.length;i++)


var objTemp=new CustomObject("ABC__c");



objTemp.Owner="[User id]";



var updateResult=sforce.connection.update(arrTemp);


//end code

Hope this will help you.


This is the non-VF, old school approach to this type of multiple selection operation. GetRecordIds() is not supported in VF and is ultimately on a deprecation path along with scontrols.

The VF way to do this that requires no javascript, no use of the ajax toolkit, etc is to leverage the standard list controller - in fact this is one of the main use cases for this new functionality. Take a look at the doc here to learn more about this powerful addition to Winter '09.

Message Edited by dchasman on 12-15-2008 09:28 AM
This is not working:  :(
I have used VF page.
In this VF Page i want to made a single button for Mass Update except multiple button for many maas update  buttonAction.
On Button click it show multiple button like DropDown containing option like(Change Type,Change Status etc..)

Are you saying you want one button that magically sets the values for a bunch of fields across the selected records automatically, i.e. no user intervention?
Is this the type of functionality you are looking for?

Yes I want to do like same things(Custom Multi-Select Buttons)

this is an good idea but how can i implement it , I don't know :(


Message Edited by GauravKumar on 12-17-2008 02:04 AM