Skip to content Skip to main navigation Skip to footer

Embed a Google Doc into a Page Layout

  • Create a custom URL field on the base object of your Document Action.
  • Copy the API name.
  • Go to the Document Action and paste this API name (without quotation or merge field brackets around it) into the field labeled Save URL to Salesforce Field.
  • Create a Visualforce page and an Apex controller extension. The page must use the object controller you want to embed on. The Visualforce page code should include the iframe code like:
    <apex:iframe src="" scrolling="true" id="theIframe"/>.  Salesforce includes standard controllers for all standard and custom objects you can use.
  • Replace the URL there with the field that contains the full URL of the google document that is on the object. You can also add to the iframe code to specify more things like width and height. Read more here:
  • You can create a Visualforce page under setup. For example, see the following example code for the standard Work Order object:
    <apex:page standardController="WorkOrder">
      <apex:iframe src="{!workorder.Google_Doc_URL__c}" scrolling="true" id="theIframe"/>
  •  Edit the standard page layout by creating a new section with one column and click on visual force pages available and drag the one you created into the page layout and specify how high you want it.