1

After creating a Custom Object and adding lookup field to a Case object, Case's detail page can have a related list of this Custom Object. This Custom Object has a field Quantity. I need to put 'Total:' under this related list. I tried insert VF page - ugly - constant height of section is killing everything. Beside this, after clicking 'Go to list (xx+) >>' it opens a new VF page with headers and side menu - ugly. Create a VF page for Case and put Related List to the bottom - no links, on which you on hover and your related list is show right under your mouse, without scrolling down or jumping to it. Any thoughts?

2
  • There can be a number of related custom object records to a case record. Are you looking for a roll-up total of all related records? As in sum of CustObj__r.Quanity__r for each Case record ID? If so, one way to do that would be to create a custom field on Case to hold that value and use a roll-up helper to populate it. It doesn't belong on the related list if its the roll-up of all the related records.
    – crmprogdev
    Oct 25, 2014 at 18:34
  • I need to display that field to a user right under Related List. Oct 25, 2014 at 21:24

1 Answer 1

1

If your custom object is a Master-Detail object from the Case, you can add a new field to the case as a roll up summary which would be the sum of your quantity field.

If your custom object is just a look up field to the Case object, you can create a new field on the Case object. I would then create a trigger on your custom object and whenever the quantity changes, update the total field value on the case.

If you want it all in one block, you can create a Visualforce page and embed it in your page. You can remove the header and sidebar in the <apex:page>. If you're having height issues, I would recommend using the standard <apex:pageBlockTable>

4
  • I can do that all, but it doesn't help if I click on 'Go to list (xx+) >>'. Oct 26, 2014 at 9:18
  • I edited my question to better reflect what want to achieve Oct 26, 2014 at 15:32
  • 1
    I think you should create a Visualpage component to your layout and get that page to be automatically resize to the appropriate height. Then you don't have to worry about the Go to list issue. And everything is less ugly, apart from the resize height hack. salesforce.com/us/developer/docs/pages/Content/…
    – GrayB
    Oct 26, 2014 at 16:32
  • I think <apex:pageBlockTable> is what I need. I'll implement this variant and then accept your answer. Oct 26, 2014 at 16:36

You must log in to answer this question.

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