+ Start a Discussion
vanessenvanessen 

Rendering standard salesforce page in iframe without header and sidebar

 i want to display an standard salesforce page in an iframe in my vf page.Im passing a parameter in my link to show only the page without sidebar and header....but the page shows in a different style.


 <apex:iframe src="/{!dossierConcours.Id}?isdtp=mn" scrolling="true" id="theIframe" /> where the isdptp=mn will show the page without sidebar but the problem is not about css, but to render the page in the current version of salesforce

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

If you use the apex:detail component, you will get the edit/delete buttons etc, plus the related lists.  You could have a visualforce page that simply displays the apex:detail and include this in an iframe if you want to ensure it doesn't interact with the rest of the page when refreshing etc.

All Answers

bob_buzzardbob_buzzard

The isdtp parameter is used for pages inside the agent console - it displays with a smaller font and as you have seen without the sidebar and header.  I doubt you'll be able to influence the behaviour any further to be honest.  Is the apex:detail component any use to you?

vanessenvanessen

Thanks for your reply. What i actually want, is to display the page in my vf page where the user can edit the page nd save it. I only need the form and the related list and so on, and i don't want to recreate the form in vf. I want to use the standard itself within my iframe.

bob_buzzardbob_buzzard

If you use the apex:detail component, you will get the edit/delete buttons etc, plus the related lists.  You could have a visualforce page that simply displays the apex:detail and include this in an iframe if you want to ensure it doesn't interact with the rest of the page when refreshing etc.

This was selected as the best answer
vanessenvanessen

oh yes, it work fine, except that when i click on edit, the headers appear again, as i think it redirect to the standard page edit mode.

bob_buzzardbob_buzzard

Bummer.  You could use the inlineedit attribute to allow editing.  Other than that you're a bit stuck I'm afraid.

vanessenvanessen

No worry, i found this option also.But i will let my client decide on the options, thanks for the immediate reply.

GYAN ANDRUSGYAN ANDRUS

 

how to render the salesforce page in frame..i dont want sidebar and header... i have seen coding,but its s not working..pls send the code

vanessenvanessen

if for example you wanted to render an opportunity page in an iframe on your VF page, then your code will look like this :

 

<apex:iframe src="https://na14.salesforce.com/006d000000Dsyff?isdtp=vw" scrolling="true" id="ifr1" />

if this doest not render, check if other url do render well.

stevenjinstevenjin
I've found the last post by vanessen to extremely helpful