function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Julie McCormickJulie McCormick 

How to include VF pages into Accounts

I have created a page in Visual Force  to show a three column table how do I add this to show on the account page. I can see the visual force page in the page layout, but its still not showing three columns as I need to show
hours    date   description of activity         and normally it will only let you display two columns

My Test Code
<apex:page standardController="Account">
   <apex:pageBlock title="Hello {!$User.FirstName}!">
      You are viewing the {!account.name} account.
   </apex:pageBlock>

   <apex:pageBlock title="Contacts">

      <apex:pageBlockTable value="{!account.Contacts}" var="contact">
            <apex:column >
                        <apex:facet name="header">hours</apex:facet>
                        <apex:facet name="footer">column footer</apex:facet>
                        <apex:outputText value="{!account.owner.name}"/>
                </apex:column>
                    <apex:column >
                        <apex:facet name="header">description</apex:facet>
                        <apex:facet name="footer">column footer</apex:facet>
                        <apex:outputText value="{!account.owner.name}"/>
                </apex:column>
               <apex:column >
                        <apex:facet name="header">De Minimis</apex:facet>
                        <apex:facet name="footer">column footer</apex:facet>
                        <apex:outputText value="{!account.owner.name}"/>

                </apex:column>
      </apex:pageBlockTable>
   </apex:pageBlock>
</apex:page>

PS I am new to SF so please keep it simple.
Best Answer chosen by Julie McCormick
JyothsnaJyothsna (Salesforce Developers) 
Hi ,

You can't see Preview in Page layout. Please go to any of the record detail pages in the account object. Now you are able to see that Visualforce page.

Hope this helps you!
Regards,
Jyothsna

All Answers

JyothsnaJyothsna (Salesforce Developers) 
Hi Julle,

I embedded your visual force page into Account object. It displays 3 columns
Please check the below steps.

Customie---->Account---->PageLayouts--->Account Layout--->Visualforce pages---->Drage and drop  your page---->save.

Please check the below screenshot

User-added image


Let me know if you need any help.

Best Regards,
Jyothsna
 
Julie McCormickJulie McCormick
User-added image

Thanks Jyothsna,

I have done extactly what you said but when I drag this into the acount page I still can't see the colums only above, so I am missing something?
JyothsnaJyothsna (Salesforce Developers) 
Hi ,

You can't see Preview in Page layout. Please go to any of the record detail pages in the account object. Now you are able to see that Visualforce page.

Hope this helps you!
Regards,
Jyothsna
This was selected as the best answer