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
harsha__charsha__c 

How to create a custom button for a related list..?

Basically, my req is like this...

 

                     I have an  object named COURSE__C and it's look-up is there in STUDENT_COURSE__C object. So obviously we will get a related list of  STUDENT_COURSE__C over the detail page of  COURSE__C.

 

                     So here i want to create a button named DELETE ALL in the related list, which enables me to delete all the look-ups of a perticular course...

 

 

If it can be done, can any one guide me towards it...........!

 

 

Thanks in advance...

 

 

Best Answer chosen by Admin (Salesforce Developers) 
yvk431yvk431

You can custom List Button on Student Course object and have it on the related list.

Now for the action, you can link it to visual force page with a controller and do your logic and again redirect back after the deletion.

 

 

--yvk