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
Prathap I am :)Prathap I am :) 

Cloning selcted reords when list button hits

Hi All ,

Let me explain my issue here ,

 

I have 2 objects lets say Account , contact .

 

I have to create a list button for "Contact" related list on account object , so when i select some records and hit "List Button" it should navigate me to new page where it should consist the information of selected records one after another . if  i modify any record field values and hit "save" button , it should save the records & navigate me to Parent Account record with contact related list updated

 

Thanks in advance if you trying to help me

 

Prathap

Best Answer chosen by Admin (Salesforce Developers) 
gbu.varungbu.varun

Please accpet my solution it does works.

All Answers

gbu.varungbu.varun

you should use StandardSetController. 

You can find more detail  here.

Vinita_SFDCVinita_SFDC

Hello,

 

You can implement this with warpper class. Please refer below link for a sample code snippet for this:

 

http://wiki.developerforce.com/page/Wrapper_Class

Prathap I am :)Prathap I am :)

Hi varun ,

Thanks for your reply .

 

ya we should use "Standard set controller" but i am not able to achieve this

gbu.varungbu.varun

Hi there is a link which you can follow to achieve this:

 

http://salesforce.stackexchange.com/questions/14065/create-custom-button-using-apex-code

 

Follow these Steps:

1)Fisrt create a controller with standardsetcontroller

2)Create VF page for this controller

3) Create List Button and add it to layout.

4)When user will press this button, controller will query for the selected records.

 

 

Prathap I am :)Prathap I am :)

Thanks varun . you came up with good idea which apts for my issue .

 

gbu.varungbu.varun

Please accpet my solution it does works.

This was selected as the best answer