2

I have an custom object and it has a look up relationship to Quote .Now i would like to create a custom button as "Edit All" and display it on related list..The functionality of the button should be as ,once the user clicks on the Edit all button the related records should get displayed.(Similar like QuoteLineItem - EditAll button functionality).

I have created a custom button ,on the custom object - 1)label & Name as "EDIT ALL" ,2)Type :ListButton ,3)behaviour as :Display in existing window side bar 4)Content Source:URL 5)given an url as:https://cs10.salesforce.com/a04.

Now what im facing is when i click on the custom button it should show only the related records to particular parent record,but i get all the records displayed of the child object(i.e custom object).Any suggestion plz.

3
  • 1
    You can get only the related objects listed by adding the ID of the parent object - the Quote - to the URL. (You can see the required pattern by clicking on the "Go to list »" link. But it sounds like you are trying to achieve some sort of bulk edit for which you will probably have to build some Visualforce and a controller. Can you confirm what the page you go to when "EDIT ALL" is used needs to do?
    – Keith C
    Commented Nov 25, 2014 at 16:54
  • @KeithC: when i click on the "EDIT All" button ,it should give me an option to edit the child records related to the parent record.For eg:if i have one parent record (quote)and 4 child records (custom) out of which 3 are related to the parent record.now when i click on the edit all button ,it should be give an option to edit those 3 related child record and save.Something similar to QuoteLineItem objects ,"EDIT ALL" button functionality.
    – nikkey
    Commented Nov 25, 2014 at 18:17
  • nikkey, what @KeithC is proposing is a workaround to get something hopefully close to what you are looking for. As it stands the result is more like a View All, than a Edit All - but possibly the closest thing to get without an app and without creating a Visualforce page.
    – Uwe Heim
    Commented Nov 25, 2014 at 18:41

1 Answer 1

1

A typical pattern to implement an requirement like that is to create a Visualforce Page along with an APEX controller. Just navigating to the related object will not work.

You also can't use Views, because unlike Reports you can't bypass url-parameters as filter criteria:

There are also some Apps out for this, e. g.:

Closest thing you can get without App and without writing code seem to be the workaround mentioned by @KeithC. The URL pattern looks like

/a04?rlid=00Nb0000002Aq4E&id=a0Xb00000000CrD

It consists of the following components:

  • a04 is the keyprefix of the child entity
  • rlid is the Related List Id which Salesforce provides automatically. This will vary an may be only obtainable using the "Go to list" link. The link is only visible, if you have more related items than the current threshold (controlled by e.g. &rowsperlist=10 on the Object View of the master item or by the Always show me viewer / more records per related list).
  • id is the record id of the master object

Keep in mind that you may end up in hardcoding some Ids in the link. That may break you button when deploying it to different Orgs.

So as a conclusion, I would strongly advocate using either an App or a Visualforce Page for Bulk editing.

You must log in to answer this question.

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