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
Jasmine FortichJasmine Fortich 

Embedded VF Page Not Rendering on Page Layout

I have a Visual Force page that I created that contains a dynamic pick list field I want to add to a page layout. The VF page uses a standard controller for "Account" and has an extension. I am having an issue with the dynamic pick list field displaying on the Account page when I add it to the page layout.

VF Code:
<apex:page standardController="Account" extensions="Account_QuoteTemplatesExtension" showHeader="false" sidebar="false">
    <apex:form >
        <apex:PageBlock mode="edit">
            <apex:PageBlockSection title="Quote Template Selection" columns="1">
                <apex:PageBlockSectionItem >

                    <!-- Label for picklist -->
                    <apex:outputLabel value="Quote Template" for="quoteTemplates" />
                    <!-- Dynamic picklist of values (quote templates) -->
                    <apex:selectList value="{!selectedTemplate}" size="1" id="quoteTemplates">
                        <apex:selectOptions value="{!TemplateOptions}" />
                    </apex:selectList>

                </apex:PageBlockSectionItem>
            </apex:PageBlockSection>
        </apex:PageBlock>
    </apex:form>
</apex:page>

Apex Controller:
global with sharing class Account_QuoteTemplatesExtension {

private final ApexPages.StandardController controller;
private final Account record;
private final Id recordId;

public String selectedTemplate {get; set;}

public Account_QuoteTemplatesExtension (ApexPages.StandardController stdController) {
    this.controller = stdController;
    this.recordId   = this.controller.getId();
    this.record     = [SELECT id, name FROM Account WHERE Id = :this.recordId LIMIT 1];
}

// Returns list of quote template options
public List<SelectOption> getTemplateOptions() {
    // Initiate option list
    List<SelectOption> tempOptions = new List<SelectOption>();
    // Get all quote templates from metadata
    List<Quote_Template__mdt> quoteTemplates = [SELECT MasterLabel, Template_Id__c FROM Quote_Template__mdt];
    // Add all options to select option list
    for (Quote_Template__mdt temp : quoteTemplates) {
        tempOptions.add(new SelectOption(temp.Template_ID__c,temp.MasterLabel));
    } 
    return tempOptions;   
}

I added the VF page in a section on the page layout like so:
Screenshot of customized page layout

But the page layout section remains blank
Blank section on page layout

The preview renders properly, but it will not display on the page layout
Preview of VF Page

I have already checked the security settings for the VF Page and have enabled access for System Administrator, which is the profile I am using. I have also tried to render a very simple VF page with the following code:
<apex:page standardController="Account">
        <apex:outputText value="Hello World" />
</apex:page>
But it still leaves the page layout blank-- I'm not sure where to go from here. Any suggestions?




 
Ajay LAjay L
Please look ath this solution provided. it is kind of browser related.

http://help.salesforce.com/HTViewSolution?id=000182262
https://success.salesforce.com/issues_view?id=a1p30000000T1LRAA0

Reagrds,
Ajay
Jasmine FortichJasmine Fortich
Hello, I don't believe it is a browser issue as I have the most updated Chrome and have no been using Firefox. I found that the VisualForce page renders fine when I use custom links / buttons, but for some reason does not render when embedded into the page layout. 
Swarna Chinthalachervu VenkataSwarna Chinthalachervu Venkata
Hi Jasmine, I am facing the same issue right now. Do you have any solution for this? 

Thanks,
Swarna