Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I created this page and put it into an iframe on the Salesforce homepage. Is there anyway I can hide these buttons at the top? I have no problem with it being there except that when I click new case it loads a whole new page to create a case, within the Iframe. I would like to avoid this. If I could remove the buttons that would be great. The other option would be to load the whole page instead of just within the iFrame. Thoughts? Thanks!

<apex:page standardcontroller="Case" showHeader="false" sidebar="false" >
<div class="homeTab">
    <apex:ListViews type="Case" />
</div>
</apex:page>

Buttons

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

I'm assuming that you have a Visualforce page that uses the <apex:listViews> tag with the type of Case. For example:

<apex:page>
    <apex:listViews type="Case"/>
</apex:page>

You need to remove the buttons from the Search Layout for the Cases List View. Doing that will remove them from your Visualforce page if you used the <apex:listViews>.

  1. From the Setup menu go to the Cases Search Layout (Customize->Cases->Search Layout).

  2. Under the Case Search Layouts click the Edit link next to the Cases List View.

  3. On the Edit Search Layout for the Cases List View, uncheck the Standard Buttons that you do not want displayed and move the Custom Buttons that you don't want displayed from the Selected Buttons list to the Available Buttons list.

That will change the list view on the standard case tab as well, though. If that is not desired then you can use the apex:facet for the header of the apex:listViews component and just give it a blank space. (Note that if you just self close the facet or give it an empty body the buttons will still show up). For example:

<apex:page>
    <apex:listViews type="Case">
        <apex:facet name="header">&nbsp;</apex:facet>
    </apex:listViews>
</apex:page>
share|improve this answer
    
yes, sorry my code was not being displayed for some reason –  user988 Dec 31 '12 at 20:28
    
this is great, except for the fact that it will also remove it from the listviews in the standard case tab –  user988 Dec 31 '12 at 20:36
    
@user988 - That's true. I updated my answer with an alternative that will clear out all of the buttons. –  Peter Knolle Dec 31 '12 at 20:43
1  
awesome, that works fine, exactly what I needed, thanks for the help! –  user988 Dec 31 '12 at 22:13
    
Great Peter, was looking for something similar. Thanks. +1 –  sw6 - KTBFFH Jan 23 at 14:52
add comment

Again I think this is not the best solution but one of the solutions that will help u move along in a short term

Assuming u want to strip the buttons from the list view here is one possible solution that you can do using isdtp param http://www.ca-peterson.com/2011/11/magic-isdtp-param.html

<apex:page sidebar="false" showheader="false" controller="case_ext"> 
<apex:iframe src="https://na14.salesforce.com/500?fcf=00Bd0000003jFUo&isdtp=lt"/>
</apex:page>

The view that will show up in the page will be :

enter image description here

share|improve this answer
1  
this works, although i'm not sure i want to implement something like this for production though. Thanks for the help! –  user988 Dec 31 '12 at 20:37
add comment

A quick and easy way to hide (all of) the buttons on the VF page is to use CSS but this may be too broadly applied as it's written. You're still going to have the normal issues of links within the iframe navigating within it, but those can be overcome as noted below.

<style type="text/css">
    input.btn { display: none; }
</style>

If the links in the iframe VF page are intended to be opened in the parent window rather than the iframe, you could use a base tag in the VF page to achieve that behavior.

<base target="_parent" />

That said, what is the business reason to have a Case list displayed on the Home page? Would it be feasible to have the user click a link from the Home page to view the Cases instead? Is the page embedded in the iframe intended to be a read-only view of Cases, which should remain as a list?

share|improve this answer
1  
Yes, basically just a list of cases on the homepage. The business reason is for the support people to have easy access to their own case view on the homepage. –  user988 Dec 31 '12 at 22:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.