2

I am trying to show related list on case page conditionally, only if the case is owned by the Current logged in salesforce User. Is there any workaround for this?

Thanks, Jai

1 Answer 1

2

You can't do this with the standard page layouts, as you don't have this level of control over related lists. The best you'll be able to achieve is a related list lookalike in Visualforce that can decide whether to render the details. The downside to this is that the embedded Visualforce will be of a fixed size, so you'll have whitespace to fill if you don't render it.

There's a blog post on this (not mine) at:

http://salesforcesource.blogspot.co.uk/2008/10/how-to-create-custom-related-list-on.html

2
  • Won't a simple combo of <apex:detail relatedList="false" subject="{!Case.Id}" /> and several <apex:relatedList list="Custom_Objects__r" subject="{!Case.Id}" rendered="{!Case.OwnerId = $User.Id}" /> work? Of course "rendered" used only on this special one and with limitation that not all relationship names are available to be used that way...
    – eyescream
    Commented May 9, 2013 at 15:35
  • Its the final point that stops me going that route usually - field history tends to be the problem. Commented May 9, 2013 at 20:42

You must log in to answer this question.

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