+ Start a Discussion
Todd B.Todd B. 

Users not seeing iFrame results in a VF page

I created a simple visualforce page and inserted it into in a custom account page layout.
<apex:page standardController="Account" >
<body>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tbody>
    <tr>
      <td align="center">
         
                  <iframe frameborder="0" height="100" marginheight="0" marginwidth="0" align="center"            
                        src="https://www.google.com/uds/modules/elements/newsshow/iframe.html?q=%22{!Account.name}%22{!Account.Acronym__c}%22&amp;#38;rsz=small&amp;#38;format=728x180" width="728">
              </iframe>
            
    </td>
    </tr>
    <tr>
      <td>
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tbody>
    <tr>
      <td width="16%" align="center" valign="middle"  scope="col">&nbsp;</td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col"><p>Magellan</p></td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">BH</td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">NIA </td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">RX</td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">Employer</td>
    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Customer</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Magellan_Customer__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Customer_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Customer_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Customer_Emp__c}" /></td>
    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Original Effective Date</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_Mag__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_EMP__c}" /></td>

    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Current Effective Date</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_Mag__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_Emp__c}" /></td>
    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Current Contract End date</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_Mag__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_Emp__c}" /></td>
    </tr>
  </tbody>
</table>
      </td>
    </tr>
  </tbody>
</table>
<p>
<em>&nbsp;* The above information is based on the infomation provided below in the Magellan Contracts section. This data is still in the early stages of data collection.</em>
</p>
<hr/>
</body>
</apex:page>

I then enabled the visualforce page for all profiles and assigned all profiles the account page layout.  All profiles see the visualforce page when they click on an account, but only system admins get results for the iframe component:
<iframe frameborder="0" height="100" marginheight="0" marginwidth="0" align="center"            
                        src="https://www.google.com/uds/modules/elements/newsshow/iframe.html?q=%22{!Account.name}%22{!Account.Acronym__c}%22&amp;#38;rsz=small&amp;#38;format=728x180" width="728">
              </iframe>

If there something I need to enable on all the other profiles to allow them to see the Google News iframe?

Thanks,
Todd B.

 
kevin lamkevin lam
Have you added it to your list of remote sites (Setup - Security Controls - Remote Site Settings)?
Pankaj_GanwaniPankaj_Ganwani
Hi,

Can you try after whitelisting the URL in CORS in salesforce?

Setup-->CORS-->New-->Enter your URL