I want to add a button which apply a brief update in a record in a related list.

As far as I've searched, there is only the possibility of adding a custom button/link in a related list table.

Thanks in advance! Cheers. Endrit.

  • I don't think this functionality is available without visualforce or a third party app, but you may be able to get some of the functionality you need using a formula field, which links to an apex page, or something similar. Feb 5, 2015 at 14:49

1 Answer 1


You can only add the button to the header of the related list, as opposed to each row. However, you can also enable the option to show checkboxes on the related list, which allows users to check any number of boxes before clicking the button, which allows you to achieve the same effect, just with an extra UI click.

Here's a button that could help you get started:

var ids = {!GETRECORDIDS($ObjectType.Contact)};
var records = [];
var record;
if(!records.length) {
    alert("Please select at least one record before using me.");
while(ids.length) {
    record = new sforce.SObject("Contact");
    record.id = ids.pop();
    record.MyField__c = "Updated";
try {
} catch(e) {
  • Thank you for your reply. I can't apply this pattern right now, because the guys in my team, decided to go with another solution. Ass soon as I apply it, and test the results, I'll mark the answer ass the solution.Bye! Feb 5, 2015 at 16:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .