+ Start a Discussion
arishi0arishi0 

Problem adding visualforce page to Home page

Hello, 

I am trying to add a visualforce page as a home page component to the home page layout. I created the visualforce page and also created  the home page component as n HTML section and added the following code to it:

 


<iframe src="https://cs1.salesforce.com/apex/Front_Page_News" width="100%" height="200px"></iframe>

 

But when I refresh the home page it only shows me the title of the component and the code instead of loading the visualforce page. Can anyone tell me what im doing wrong?

 

Thank you!

Best Answer chosen by Admin (Salesforce Developers) 
DevNVDevNV

When you create the component, make sure you have the "Show HTML" checkbox checked - otherwise you are simply typing text into the HTML area and the system thinks you want to display it!  So clear out what you have, check the box and then paste the code back in.

 

Another tip, I suggest your src always use the relative path so this will work in Sandbox and Prod - just use "/apex/Front_Page_News".

 

Hope that helps.

 

Niki

www.vankerksolutions.com

All Answers

DevNVDevNV

When you create the component, make sure you have the "Show HTML" checkbox checked - otherwise you are simply typing text into the HTML area and the system thinks you want to display it!  So clear out what you have, check the box and then paste the code back in.

 

Another tip, I suggest your src always use the relative path so this will work in Sandbox and Prod - just use "/apex/Front_Page_News".

 

Hope that helps.

 

Niki

www.vankerksolutions.com

This was selected as the best answer
arishi0arishi0

Thanks so much for helping me out! 

nobodyroxnobodyrox

what if i want to add a custom visual force page... i tried your method for that... it did`nt work :(