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
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
<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...
Commented
May 9, 2013 at 15:35