+ Start a Discussion
GauravKumarGauravKumar 

Customize List Button

Hi,
I have an Prpblem Related to Customize List Button.
I want to add multiple oprtion in One Button(For Mass Update)
Like
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 ...


anjuanju

you can do this by the following method -

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

//start code

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}

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.id=arrSelectedRecordIds[i];

objTemp.status="propective";

objTemp.Owner="[User id]";

arrTemp.push(objTemp);

}

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

}

//end code

Hope this will help you.

 

dchasmandchasman
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
GauravKumarGauravKumar
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..)


mtbclimbermtbclimber
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?
TehNrdTehNrd
Is this the type of functionality you are looking for?

http://ideas.salesforce.com/article/show/10091005/Custom_multiSelect_buttons
GauravKumarGauravKumar
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 :(

http://ideas.salesforce.com/article/show/10091005/Custom_multiSelect_buttons


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